Class UndoStack
- Namespace
- ReportWright.Design.Commands
- Assembly
- ReportWright.Design.dll
The undo and redo stacks with per-gesture coalescing (A.3.7): every command executed between BeginGesture(string) and EndGesture() becomes one entry, and a gesture that executed nothing leaves no entry at all.
public sealed class UndoStack
- Inheritance
-
UndoStack
- Inherited Members
Constructors
Properties
- CanRedo
Gets whether there is something to redo.
- CanUndo
Gets whether there is something to undo.
- Count
Gets the number of undo entries.
- InGesture
Gets whether a gesture is open.
- RedoLabel
Gets the label of the next redo, or null.
- UndoLabel
Gets the label of the next undo, or null.
Methods
- BeginGesture(string)
Opens a gesture; nested calls join the outermost one.
- CancelGesture()
Abandons the open gesture, reverting what it executed.
- Clear()
Forgets every entry, for example after a save that resets the baseline or a new document.
- EndGesture()
Closes the gesture: one entry when it executed anything, none otherwise.
- Execute(IDesignCommand)
Executes a command and records it (into the open gesture, or as its own entry). Redo is cleared.
- Redo()
Redoes the last undone entry.
- Undo()
Undoes the last entry.
Events
- Changed
Raised after an execute, undo, redo or clear.