HistoryManager class
Beep.Skia (core) — class
Helper class for managing undo/redo operations in the drawing manager. Callers apply a change first and then record the action with ExecuteAction; the action's Execute/Undo methods are used when replaying history.
Members
| Member | Kind | Description |
|---|---|---|
int MaxHistoryDepth | Property | Gets or sets the maximum number of undo steps retained. 0 means unlimited. |
bool IsApplyingHistory | Property | Gets a value indicating whether an undo/redo replay is currently in progress. While replaying, nested history recording is suppressed to protect the stacks. |
bool CanUndo | Property | Gets a value indicating whether undo is available. |
bool CanRedo | Property | Gets a value indicating whether redo is available. |
event EventHandler HistoryChanged | Event | Occurs when the undo/redo state changes. |
HistoryManager(DrawingManager drawingManager) | Method | Initializes a new instance of the HistoryManager class. The drawing manager that owns this history manager. |
void ExecuteAction(DrawingAction action) | Method | Records an already-applied action on the undo stack. The action to record. |
void Undo() | Method | Undoes the last action. |
void Redo() | Method | Redoes the last undone action. |
void Clear() | Method | Clears the undo/redo history. |
int UndoCount | Property | Gets the number of actions that can be undone. |
int RedoCount | Property | Gets the number of actions that can be redone. |