XUIUndoManager
Description
XUIUndoManager
forms the basis of a generic, application-wide, undo / redo manager. It is used
extensively throughout XUI and can be seen in action in the XUICodeEditor
demo.
It essentially manages a stack of XUIUndoableAction
instances.
Properties
Name | Type | Read-Only |
---|---|---|
CanRedo | Boolean |
✔ |
CanUndo | Boolean |
✔ |
IsUndoing | Boolean |
✔ |
mIsUndoing | Boolean |
|
mRedoStack() | XUIUndoableAction |
|
mUndoStack() | XUIUndoableAction |
|
mUndoStackIndex | Integer |
Methods
Name | Parameters | Returns |
---|---|---|
AddActionToRedoStack | action As XUIUndoableAction |
|
AddActionToUndoStack | action As XUIUndoableAction |
|
NextRedo | XUIUndoableAction |
|
NextUndo | XUIUndoableAction |
|
Push | action As XUIUndoableAction |
|
Redo | ||
Redo | id As Integer |
|
RemoveAll | ||
Undo | ||
Undo | ID As integer |
Property Descriptions
CanRedo As Boolean
True if there are available redo actions.
CanUndo As Boolean
True if there are available undo actions.
IsUndoing As Boolean
True if the UndoManager is currently undoing.
mIsUndoing As Boolean
Backing field for the IsUndoing
computed property.
mRedoStack() As XUIUndoableAction
The stack of redo actions.
mUndoStack() As XUIUndoableAction
The stack of undo actions.
mUndoStackIndex As Integer
A pointer to the top of the undo stack.
Method Descriptions
AddActionToRedoStack(action As XUIUndoableAction)
Adds action
to the stack of redoable actions.
AddActionToUndoStack(action As XUIUndoableAction)
Adds action
to the stack of undoable actions.
NextRedo() As XUIUndoableAction
Returns a reference to the next redoable action.
NextUndo() As XUIUndoableAction
Returns a reference to the next undoable action.
Push(action As XUIUndoableAction)
Pushes an undoable action
on to the UndoManager's stack.
Redo()
Redos the last action.
Redo(id As Integer)
Redos the action with the specified id
.
RemoveAll()
Resets the UndoManager, removing all undoable actions.
Undo()
Undos the last action.
Undo(ID As integer)
Undos the action with the specified id
.