ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
vtkSMUndoStack Class Reference

This is the undo/redo stack for the Server Manager. More...

#include <vtkSMUndoStack.h>

Inheritance diagram for vtkSMUndoStack:
Inheritance graph
[legend]
Collaboration diagram for vtkSMUndoStack:
Collaboration graph
[legend]

Public Types

enum  EventIds { PushUndoSetEvent = 1987, ObjectCreationEvent = 1988 }
 
typedef vtkUndoStack Superclass
 
- Public Types inherited from vtkUndoStack
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...
 
- Public Member Functions inherited from vtkUndoStack
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 vtkUndoSetGetNextUndoSet ()
 Get the UndoSet on the top of the Undo stack, if any. More...
 
virtual vtkUndoSetGetNextRedoSet ()
 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 vtkSMUndoStackNew ()
 
static int IsTypeOf (const char *type)
 
static vtkSMUndoStackSafeDownCast (vtkObject *o)
 
- Static Public Member Functions inherited from vtkUndoStack
static vtkUndoStackNew ()
 
static int IsTypeOf (const char *type)
 
static vtkUndoStackSafeDownCast (vtkObject *o)
 

Protected Member Functions

 vtkSMUndoStack ()
 
 ~vtkSMUndoStack ()
 
void FillWithRemoteObjects (vtkUndoSet *undoSet, vtkCollection *collection)
 
- Protected Member Functions inherited from vtkUndoStack
 vtkUndoStack ()
 Get set the maximum stack depth. More...
 
 ~vtkUndoStack ()
 Get set the maximum stack depth. More...
 

Additional Inherited Members

- Protected Attributes inherited from vtkUndoStack
vtkUndoStackInternalInternal
 
int StackDepth
 

Detailed Description

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.

See also
vtkSMUndoStackBuilder

Definition at line 47 of file vtkSMUndoStack.h.

Member Typedef Documentation

§ Superclass

Definition at line 51 of file vtkSMUndoStack.h.

Member Enumeration Documentation

§ EventIds

Enumerator
PushUndoSetEvent 
ObjectCreationEvent 

Definition at line 78 of file vtkSMUndoStack.h.

Constructor & Destructor Documentation

§ vtkSMUndoStack()

vtkSMUndoStack::vtkSMUndoStack ( )
protected

§ ~vtkSMUndoStack()

vtkSMUndoStack::~vtkSMUndoStack ( )
protected

Member Function Documentation

§ New()

static vtkSMUndoStack* vtkSMUndoStack::New ( )
static

§ GetClassName()

virtual const char* vtkSMUndoStack::GetClassName ( )
virtual

Reimplemented from vtkUndoStack.

§ IsTypeOf()

static int vtkSMUndoStack::IsTypeOf ( const char *  type)
static

§ IsA()

virtual int vtkSMUndoStack::IsA ( const char *  type)
virtual

Reimplemented from vtkUndoStack.

§ SafeDownCast()

static vtkSMUndoStack* vtkSMUndoStack::SafeDownCast ( vtkObject *  o)
static

§ PrintSelf()

void vtkSMUndoStack::PrintSelf ( ostream &  os,
vtkIndent  indent 
)

§ Push()

virtual void vtkSMUndoStack::Push ( const char *  label,
vtkUndoSet changeSet 
)
virtual

Push an undo set on the Undo stack.

This will clear any sets in the Redo stack.

Reimplemented from vtkUndoStack.

§ Undo()

virtual int vtkSMUndoStack::Undo ( )
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.

Returns
the status of the operation.

Reimplemented from vtkUndoStack.

§ Redo()

virtual int vtkSMUndoStack::Redo ( )
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.

Returns
the status of the operation.

Reimplemented from vtkUndoStack.

§ FillWithRemoteObjects()

void vtkSMUndoStack::FillWithRemoteObjects ( vtkUndoSet undoSet,
vtkCollection *  collection 
)
protected

The documentation for this class was generated from the following file: