HUndoManager
Functions
int |
|
int |
|
void |
|
void |
|
void |
|
void |
|
void |
Detailed Description
-
class HUndoManager
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.
Public Functions
-
HUndoManager()
Constructs an HUndoManager object.
-
virtual ~HUndoManager()
-
int Undo(int steps = 1, bool testOnly = false, bool setupOnly = false)
This method restores the scene to its previous state.
- Parameters
steps – Number of steps to roll back
testOnly – Pass True if you only want to validate that undos are available.
setupOnly – Pass True to perform undos without updating the display.
- Returns
The number of undo steps performed.
-
int Redo(int steps = 1, bool testOnly = false, bool setupOnly = false)
This method restores the scene to the state prior to the rollback.
- Parameters
steps – Number of steps to redo
testOnly – Pass True if you only want to validate that redos are available.
setupOnly – Pass True to perform redos without updating the display.
- Returns
The number of redo steps performed.
-
void 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
item – Undo Item
-
void Flush()
This method removes all undos and redos from the undo list.
-
void BeginUndoItemIteration()
This method begins iteration of the undo list by setting the correct cursor positions.
-
HUndoItem *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.
-
void EndUndoItemIteration()
This method ends iteration of the undo list by resetting the cursor of the undo list.
-
HUndoManager()