UndoManager¶
-
MLModule
¶ genre Fields
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll MLUndoContext
definition MLUndoContext.def keywords undo
,redo
,manager
Purpose¶
This module provides an undo context that may be plugged into other modules that are prepared to use it.
Usage¶
Connect the output of this module to all other modules with appropriate input connectors that should share the same undo context. The module panel shows the available undo/redo steps and the buttons to trigger them.
Details¶
An undo context is a step of actions that can be undone/redone to get at a previous/later state of an edited object/document/etc.
Steps on the undo stack are automatically pushed to the redo stack when they are undone and vice versa.
Tips¶
Disconnecting a module from this module will not only remove all undo steps of that module irrevocably, but also all steps that came before/after on the undo/redo stack, since it is assumed that preceding/later object/document states can’t be restored without these missing steps. The state of the object/document should not be changed by this.
Steps that can be undone independently probably should be handled by different undo contexts. The application developer is responsible for identifying suitable undo contexts and handling access to their undo/redo operations.
Output Fields¶
outUndoContext¶
-
name:
outUndoContext
, type:
UndoContext(MLBase)
¶ Connect this to the same-typed input of modules with undoable operations.
For accessing this object via scripting see the Scripting Reference:MLUndoContextWrapper
.
Parameter Fields¶
Field Index¶
Clear : Trigger |
Undo : Trigger |
hasRedo : Bool |
undoDescription : String |
hasUndo : Bool |
|
maxNumberUndoSteps : Integer |
|
numRedoSteps : Integer |
|
numUndoSteps : Integer |
|
Redo : Trigger |
|
redoDescription : String |