VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
vtkInteractorEventRecorder Class Reference

record and play VTK events passing through a vtkRenderWindowInteractor More...

#include <vtkInteractorEventRecorder.h>

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

List of all members.

Public Types

typedef vtkInteractorObserver Superclass

Public Member Functions

virtual int IsA (const char *type)
vtkInteractorEventRecorderNewInstance () const
void PrintSelf (ostream &os, vtkIndent indent)
virtual void SetEnabled (int)
virtual void SetInteractor (vtkRenderWindowInteractor *iren)
void Record ()
void Play ()
void Stop ()
void Rewind ()
virtual void SetFileName (const char *)
virtual char * GetFileName ()
virtual void SetReadFromInputString (int)
virtual int GetReadFromInputString ()
virtual void ReadFromInputStringOn ()
virtual void ReadFromInputStringOff ()
virtual void SetInputString (const char *)
virtual char * GetInputString ()

Static Public Member Functions

static vtkInteractorEventRecorderNew ()
static int IsTypeOf (const char *type)
static vtkInteractorEventRecorderSafeDownCast (vtkObjectBase *o)

Protected Types

enum  WidgetState { Start = 0, Playing, Recording }

Protected Member Functions

virtual vtkObjectBaseNewInstanceInternal () const
 vtkInteractorEventRecorder ()
 ~vtkInteractorEventRecorder ()
virtual void WriteEvent (const char *event, int pos[2], int ctrlKey, int shiftKey, int keyCode, int repeatCount, char *keySym)
virtual void ReadEvent ()

Static Protected Member Functions

static void ProcessCharEvent (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
static void ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)

Protected Attributes

char * FileName
int ReadFromInputString
char * InputString
istream * InputStream
ostream * OutputStream
int State

Static Protected Attributes

static float StreamVersion

Detailed Description

record and play VTK events passing through a vtkRenderWindowInteractor

vtkInteractorEventRecorder records all VTK events invoked from a vtkRenderWindowInteractor. The events are recorded to a file. vtkInteractorEventRecorder can also be used to play those events back and invoke them on an vtkRenderWindowInteractor. (Note: the events can also be played back from a file or string.)

The format of the event file is simple. It is: EventName X Y ctrl shift keycode repeatCount keySym The format also allows "#" comments.

See also:
vtkInteractorObserver vtkCallback
Events:
vtkCommand::DisableEvent vtkCommand::EnableEvent
Tests:
vtkInteractorEventRecorder (Tests)

Definition at line 46 of file vtkInteractorEventRecorder.h.


Member Typedef Documentation

Reimplemented from vtkInteractorObserver.

Definition at line 50 of file vtkInteractorEventRecorder.h.


Member Enumeration Documentation

Enumerator:
Start 
Playing 
Recording 

Definition at line 120 of file vtkInteractorEventRecorder.h.


Constructor & Destructor Documentation


Member Function Documentation

Create an object with Debug turned off, modified time initialized to zero, and reference counting on.

Reimplemented from vtkObject.

static int vtkInteractorEventRecorder::IsTypeOf ( const char *  name) [static]

Return 1 if this class type is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkInteractorObserver.

virtual int vtkInteractorEventRecorder::IsA ( const char *  name) [virtual]

Return 1 if this class is the same type of (or a subclass of) the named class. Returns 0 otherwise. This method works in combination with vtkTypeMacro found in vtkSetGet.h.

Reimplemented from vtkInteractorObserver.

Reimplemented from vtkInteractorObserver.

virtual vtkObjectBase* vtkInteractorEventRecorder::NewInstanceInternal ( ) const [protected, virtual]

Reimplemented from vtkInteractorObserver.

Reimplemented from vtkInteractorObserver.

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

Methods invoked by print to print information about the object including superclasses. Typically not called by the user (use Print() instead) but used in the hierarchical print process to combine the output of several classes.

Reimplemented from vtkInteractorObserver.

virtual void vtkInteractorEventRecorder::SetEnabled ( int  ) [virtual]

Methods for turning the interactor observer on and off, and determining its state. All subclasses must provide the SetEnabled() method. Enabling a vtkInteractorObserver has the side effect of adding observers; disabling it removes the observers. Prior to enabling the vtkInteractorObserver you must set the render window interactor (via SetInteractor()). Initial value is 0.

Reimplemented from vtkInteractorObserver.

This method is used to associate the widget with the render window interactor. Observers of the appropriate events invoked in the render window interactor are set up as a result of this method invocation. The SetInteractor() method must be invoked prior to enabling the vtkInteractorObserver. It automatically registers available pickers to the Picking Manager.

Reimplemented from vtkInteractorObserver.

virtual void vtkInteractorEventRecorder::SetFileName ( const char *  ) [virtual]

Set/Get the name of a file events should be written to/from.

virtual char* vtkInteractorEventRecorder::GetFileName ( ) [virtual]

Set/Get the name of a file events should be written to/from.

Invoke this method to begin recording events. The events will be recorded to the filename indicated.

Invoke this method to begin playing events from the current position. The events will be played back from the filename indicated.

Invoke this method to stop recording/playing events.

Rewind to the beginning of the file.

Enable reading from an InputString as compared to the default behavior, which is to read from a file.

Enable reading from an InputString as compared to the default behavior, which is to read from a file.

Enable reading from an InputString as compared to the default behavior, which is to read from a file.

Enable reading from an InputString as compared to the default behavior, which is to read from a file.

virtual void vtkInteractorEventRecorder::SetInputString ( const char *  ) [virtual]

Set/Get the string to read from.

virtual char* vtkInteractorEventRecorder::GetInputString ( ) [virtual]

Set/Get the string to read from.

static void vtkInteractorEventRecorder::ProcessCharEvent ( vtkObject object,
unsigned long  event,
void *  clientdata,
void *  calldata 
) [static, protected]
static void vtkInteractorEventRecorder::ProcessEvents ( vtkObject object,
unsigned long  event,
void *  clientdata,
void *  calldata 
) [static, protected]

Handles the char widget activation event. Also handles the delete event.

Reimplemented from vtkInteractorObserver.

virtual void vtkInteractorEventRecorder::WriteEvent ( const char *  event,
int  pos[2],
int  ctrlKey,
int  shiftKey,
int  keyCode,
int  repeatCount,
char *  keySym 
) [protected, virtual]
virtual void vtkInteractorEventRecorder::ReadEvent ( ) [protected, virtual]

Member Data Documentation

Definition at line 96 of file vtkInteractorEventRecorder.h.

Definition at line 99 of file vtkInteractorEventRecorder.h.

Definition at line 100 of file vtkInteractorEventRecorder.h.

Definition at line 103 of file vtkInteractorEventRecorder.h.

Definition at line 104 of file vtkInteractorEventRecorder.h.

Definition at line 119 of file vtkInteractorEventRecorder.h.

Definition at line 128 of file vtkInteractorEventRecorder.h.


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