vtkInteractorEventRecorder Class Reference

#include <vtkInteractorEventRecorder.h>

Inheritance diagram for vtkInteractorEventRecorder:

Inheritance graph
[legend]
Collaboration diagram for vtkInteractorEventRecorder:

Collaboration graph
[legend]

List of all members.


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


Public Types

typedef vtkInteractorObserver Superclass

Public Member Functions

virtual const char * GetClassName ()
virtual int IsA (const char *type)
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 (vtkObject *o)

Protected Types

enum  WidgetState { Start = 0, Playing, Recording }

Protected Member Functions

 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

Member Typedef Documentation

Reimplemented from vtkInteractorObserver.

Definition at line 49 of file vtkInteractorEventRecorder.h.


Member Enumeration Documentation

Enumerator:
Start 
Playing 
Recording 

Definition at line 119 of file vtkInteractorEventRecorder.h.


Constructor & Destructor Documentation

vtkInteractorEventRecorder::vtkInteractorEventRecorder (  )  [protected]

vtkInteractorEventRecorder::~vtkInteractorEventRecorder (  )  [protected]


Member Function Documentation

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

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

Reimplemented from vtkObject.

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

Reimplemented from vtkInteractorObserver.

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.

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

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.

virtual void vtkInteractorEventRecorder::SetInteractor ( vtkRenderWindowInteractor iren  )  [virtual]

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.

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.

void vtkInteractorEventRecorder::Record (  ) 

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

void vtkInteractorEventRecorder::Play (  ) 

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

void vtkInteractorEventRecorder::Stop (  ) 

Invoke this method to stop recording/playing events.

void vtkInteractorEventRecorder::Rewind (  ) 

Rewind to the beginning of the file.

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

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

virtual int vtkInteractorEventRecorder::GetReadFromInputString (  )  [virtual]

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

virtual void vtkInteractorEventRecorder::ReadFromInputStringOn (  )  [virtual]

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

virtual void vtkInteractorEventRecorder::ReadFromInputStringOff (  )  [virtual]

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 95 of file vtkInteractorEventRecorder.h.

Definition at line 98 of file vtkInteractorEventRecorder.h.

Definition at line 99 of file vtkInteractorEventRecorder.h.

Definition at line 102 of file vtkInteractorEventRecorder.h.

Definition at line 103 of file vtkInteractorEventRecorder.h.

Definition at line 118 of file vtkInteractorEventRecorder.h.

float vtkInteractorEventRecorder::StreamVersion [static, protected]

Definition at line 127 of file vtkInteractorEventRecorder.h.


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

Generated on Mon Sep 27 18:30:50 2010 for VTK by  doxygen 1.5.6