ParaView
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
vtkSMUndoStack Class Reference

#include <vtkSMUndoStack.h>

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

List of all members.

Public Types

enum  EventIds { PushUndoSetEvent = 1987, ObjectCreationEvent = 1988 }

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)
virtual int Undo ()
virtual int Redo ()

Static Public Member Functions

static vtkSMUndoStackNew ()
static int IsTypeOf (const char *type)
static vtkSMUndoStackSafeDownCast (vtkObject *o)

Protected Member Functions

 vtkSMUndoStack ()
 ~vtkSMUndoStack ()
void FillWithRemoteObjects (vtkUndoSet *undoSet, vtkCollection *collection)

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 45 of file vtkSMUndoStack.h.


Member Enumeration Documentation

Enumerator:
PushUndoSetEvent 
ObjectCreationEvent 

Reimplemented from vtkUndoStack.

Definition at line 72 of file vtkSMUndoStack.h.


Constructor & Destructor Documentation

vtkSMUndoStack::vtkSMUndoStack ( ) [protected]
vtkSMUndoStack::~vtkSMUndoStack ( ) [protected]

Member Function Documentation

static vtkSMUndoStack* vtkSMUndoStack::New ( ) [static]

Reimplemented from vtkUndoStack.

virtual const char* vtkSMUndoStack::GetClassName ( ) [virtual]

Reimplemented from vtkUndoStack.

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

Reimplemented from vtkUndoStack.

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

Reimplemented from vtkUndoStack.

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

Reimplemented from vtkUndoStack.

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

Reimplemented from vtkUndoStack.

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.

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.

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.

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

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