HUndoManager Class Reference

#include <HUndoManager.h>

Public Member Functions

void AddUndoItem (HUndoItem *item)
 
void BeginUndoItemIteration ()
 
void EndUndoItemIteration ()
 
void Flush ()
 
HUndoItemGetNextUndoItem ()
 
 HUndoManager ()
 
HUndoItemPeek ()
 
int Redo (int steps=1, bool testOnly=false, bool setupOnly=false)
 
void Reset (HBaseView *view)
 
int Undo (int steps=1, bool testOnly=false, bool setupOnly=false)
 

Detailed Description

HUndoManager manages the undo stack. It performs redo and undos. You can also add undo items to the list, get the next item on the list and peek at the current item.

Constructor & Destructor Documentation

◆ HUndoManager()

HUndoManager::HUndoManager ( )

Constructs an HUndoManager object.

Member Function Documentation

◆ AddUndoItem()

void HUndoManager::AddUndoItem ( HUndoItem item)

The method adds item to the undo list at the current cursor position. It also remove all items after the current cursor position from the undo list.

Parameters
itemUndo Item

◆ BeginUndoItemIteration()

void HUndoManager::BeginUndoItemIteration ( )

This method begins iteration of the undo list by setting the correct cursor positions.

◆ EndUndoItemIteration()

void HUndoManager::EndUndoItemIteration ( )

This method ends iteration of the undo list by resetting the cursor of the undo list.

◆ Flush()

void HUndoManager::Flush ( )

This method removes all undos and redos from the undo list.

◆ GetNextUndoItem()

HUndoItem* HUndoManager::GetNextUndoItem ( )

This methods returns the next undo item in the list and moves the cursor to the next item in the list.

Returns
The next undo item.

◆ Peek()

HUndoItem* HUndoManager::Peek ( )
Returns
A pointer to the current undo item.

◆ Redo()

int HUndoManager::Redo ( int  steps = 1,
bool  testOnly = false,
bool  setupOnly = false 
)

This method restores the scene to the state prior to the rollback.

Parameters
stepsNumber of steps to redo
testOnlyPass True if you only want to validate that redos are available.
setupOnlyPass True to perform redos without updating the display.
Returns
The number of redo steps performed.

◆ Reset()

void HUndoManager::Reset ( HBaseView view)

This method smoothly transitions the scene back to its original state.

◆ Undo()

int HUndoManager::Undo ( int  steps = 1,
bool  testOnly = false,
bool  setupOnly = false 
)

This method restores the scene to its previous state.

Parameters
stepsNumber of steps to roll back
testOnlyPass True if you only want to validate that undos are available.
setupOnlyPass True to perform undos without updating the display.
Returns
The number of undo steps performed.

The documentation for this class was generated from the following file: