ParaView
|
This is the undo/redo stack for the Server Manager. More...
#include <vtkSMUndoStack.h>
Public Types | |
enum | EventIds { PushUndoSetEvent = 1987, ObjectCreationEvent = 1988 } |
typedef vtkUndoStack | Superclass |
![]() | |
enum | EventIds { UndoSetRemovedEvent = 1989, UndoSetClearedEvent = 1990 } |
typedef vtkObject | Superclass |
Public Member Functions | |
virtual const char * | GetClassName () |
virtual int | IsA (const char *type) |
void | PrintSelf (ostream &os, vtkIndent indent) |
virtual void | Push (const char *label, vtkUndoSet *changeSet) |
Push an undo set on the Undo stack. More... | |
virtual int | Undo () |
Performs an Undo using the set on the top of the undo stack. More... | |
virtual int | Redo () |
Performs a Redo using the set on the top of the redo stack. More... | |
![]() | |
void | PrintSelf (ostream &os, vtkIndent indent) |
const char * | GetUndoSetLabel (unsigned int position) |
Returns the label for the set at the given Undo position. More... | |
const char * | GetRedoSetLabel (unsigned int position) |
Returns the label for the set at the given Redo position. More... | |
unsigned int | GetNumberOfUndoSets () |
Returns the number of sets on the undo stack. More... | |
unsigned int | GetNumberOfRedoSets () |
Returns the number of sets on the undo stack. More... | |
int | CanUndo () |
Returns if undo operation can be performed. More... | |
int | CanRedo () |
Returns if redo operation can be performed. More... | |
virtual vtkUndoSet * | GetNextUndoSet () |
Get the UndoSet on the top of the Undo stack, if any. More... | |
virtual vtkUndoSet * | GetNextRedoSet () |
Get the UndoSet on the top of the Redo stack, if any. More... | |
void | PopUndoStack () |
Pop the undo stack. More... | |
void | PopRedoStack () |
Pop the redo stack. More... | |
void | Clear () |
Clears all the undo/redo elements from the stack. More... | |
virtual bool | GetInUndo () |
Returns if the stack is currently being undone. More... | |
virtual bool | GetInRedo () |
Returns if the stack is currently being redone. More... | |
virtual void | SetStackDepth (int) |
Get set the maximum stack depth. More... | |
virtual int | GetStackDepth () |
Get set the maximum stack depth. More... | |
Static Public Member Functions | |
static vtkSMUndoStack * | New () |
static int | IsTypeOf (const char *type) |
static vtkSMUndoStack * | SafeDownCast (vtkObject *o) |
![]() | |
static vtkUndoStack * | New () |
static int | IsTypeOf (const char *type) |
static vtkUndoStack * | SafeDownCast (vtkObject *o) |
Protected Member Functions | |
vtkSMUndoStack () | |
~vtkSMUndoStack () | |
void | FillWithRemoteObjects (vtkUndoSet *undoSet, vtkCollection *collection) |
![]() | |
vtkUndoStack () | |
Get set the maximum stack depth. More... | |
~vtkUndoStack () | |
Get set the maximum stack depth. More... | |
Additional Inherited Members | |
![]() | |
vtkUndoStackInternal * | Internal |
int | StackDepth |
This is the undo/redo stack for the Server Manager.
This provides a unified face for undo/redo irrespective of number of connections, their type etc etc.
On every undo/redo, it fetches the XML state change from the server. vtkSMUndoRedoStateLoader is used to generate a vtkUndoSet object from the XML. GUI can subclass vtkSMUndoRedoStateLoader to handle GUI specific XML elements. The loader instance must be set before performing the undo, otherwise vtkSMUndoRedoStateLoader is used.
This class also provides API to push any vtkUndoSet instance on to a server. GUI can use this to push its own changes that is undoable across connections.
Definition at line 47 of file vtkSMUndoStack.h.
Definition at line 51 of file vtkSMUndoStack.h.
Enumerator | |
---|---|
PushUndoSetEvent | |
ObjectCreationEvent |
Definition at line 78 of file vtkSMUndoStack.h.
|
protected |
|
protected |
|
static |
|
virtual |
Reimplemented from vtkUndoStack.
|
static |
|
virtual |
Reimplemented from vtkUndoStack.
|
static |
void vtkSMUndoStack::PrintSelf | ( | ostream & | os, |
vtkIndent | indent | ||
) |
|
virtual |
Push an undo set on the Undo stack.
This will clear any sets in the Redo stack.
Reimplemented from vtkUndoStack.
|
virtual |
Performs an Undo using the set on the top of the undo stack.
The set is poped from the undo stack and pushed at the top of the redo stack. Before undo begins, it fires vtkCommand::StartEvent and when undo completes, it fires vtkCommand::EndEvent.
Reimplemented from vtkUndoStack.
|
virtual |
Performs a Redo using the set on the top of the redo stack.
The set is poped from the redo stack and pushed at the top of the undo stack. Before redo begins, it fires vtkCommand::StartEvent and when redo completes, it fires vtkCommand::EndEvent.
Reimplemented from vtkUndoStack.
|
protected |