The Undo class is responsible for managing the undo state and stack. It is implemented as a singleton with a static interface. Register IUndo inheriting actions with Undo.RegisterState or Undo.RegisterStates, and use Undo.PerformUndo and Undo.PerformRedo to step through the stack.
- See also
- IUndo, UndoDelete, UndoInstantiate, UndoTransform
Definition at line 14 of file Undo.cs.
◆ AddRedoPerformedListener()
static void GILES.Undo.AddRedoPerformedListener |
( |
Callback |
callback | ) |
|
|
static |
Add a callback when an Redo action is performed.
Definition at line 77 of file Undo.cs.
◆ AddUndoPerformedListener()
static void GILES.Undo.AddUndoPerformedListener |
( |
Callback |
callback | ) |
|
|
static |
Add a callback when an Undo action is performed.
Definition at line 66 of file Undo.cs.
◆ GetCurrentRedo()
static string GILES.Undo.GetCurrentRedo |
( |
| ) |
|
|
static |
Get the message accompanying the next queued redo action.
Definition at line 204 of file Undo.cs.
◆ GetCurrentUndo()
static string GILES.Undo.GetCurrentUndo |
( |
| ) |
|
|
static |
Get the message from the last registered IUndo, or if PerformRedo was called more recently, this will be the currently queued undo action.
Definition at line 196 of file Undo.cs.
◆ PerformRedo()
static void GILES.Undo.PerformRedo |
( |
| ) |
|
|
static |
◆ PerformUndo()
static void GILES.Undo.PerformUndo |
( |
| ) |
|
|
static |
Applies the currently queued Undo state.
Definition at line 237 of file Undo.cs.
◆ PrintRedoStack()
static string GILES.Undo.PrintRedoStack |
( |
| ) |
|
|
static |
Return a formatted string with a summary of every redo-able action in the redo stack.
Definition at line 99 of file Undo.cs.
◆ PrintUndoStack()
static string GILES.Undo.PrintUndoStack |
( |
| ) |
|
|
static |
Return a formatted string with a summary of every undo-able action in the undo stack.
Definition at line 91 of file Undo.cs.
◆ RegisterState()
static void GILES.Undo.RegisterState |
( |
IUndo |
target, |
|
|
string |
message |
|
) |
| |
|
static |
Register a new undoable state with message. Message should describe the action that will be undone.
- See also
- IUndo
Definition at line 214 of file Undo.cs.
◆ RegisterStates()
static void GILES.Undo.RegisterStates |
( |
IEnumerable< IUndo > |
targets, |
|
|
string |
message |
|
) |
| |
|
static |
Register a collection of undoable states with message. Message should describe the action that will be undone.
- See also
- IUndo
Definition at line 226 of file Undo.cs.
◆ redoPerformed
Callback GILES.Undo.redoPerformed = null |
◆ redoStackModified
Callback GILES.Undo.redoStackModified = null |
◆ undoPerformed
Callback GILES.Undo.undoPerformed = null |
◆ undoStackModified
Callback GILES.Undo.undoStackModified = null |
The documentation for this class was generated from the following file: