VTK
|
record and play VTK events passing through a vtkRenderWindowInteractor More...
#include <vtkInteractorEventRecorder.h>
Public Types | |
typedef vtkInteractorObserver | Superclass |
Public Member Functions | |
virtual int | IsA (const char *type) |
vtkInteractorEventRecorder * | NewInstance () 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 vtkInteractorEventRecorder * | New () |
static int | IsTypeOf (const char *type) |
static vtkInteractorEventRecorder * | SafeDownCast (vtkObjectBase *o) |
Protected Types | |
enum | WidgetState { Start = 0, Playing, Recording } |
Protected Member Functions | |
virtual vtkObjectBase * | NewInstanceInternal () 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 |
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.
Definition at line 46 of file vtkInteractorEventRecorder.h.
Reimplemented from vtkInteractorObserver.
Definition at line 50 of file vtkInteractorEventRecorder.h.
enum vtkInteractorEventRecorder::WidgetState [protected] |
Definition at line 120 of file vtkInteractorEventRecorder.h.
vtkInteractorEventRecorder::vtkInteractorEventRecorder | ( | ) | [protected] |
vtkInteractorEventRecorder::~vtkInteractorEventRecorder | ( | ) | [protected] |
static vtkInteractorEventRecorder* vtkInteractorEventRecorder::New | ( | ) | [static] |
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.
static vtkInteractorEventRecorder* vtkInteractorEventRecorder::SafeDownCast | ( | vtkObjectBase * | o | ) | [static] |
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.
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. 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.
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] |
char* vtkInteractorEventRecorder::FileName [protected] |
Definition at line 96 of file vtkInteractorEventRecorder.h.
int vtkInteractorEventRecorder::ReadFromInputString [protected] |
Definition at line 99 of file vtkInteractorEventRecorder.h.
char* vtkInteractorEventRecorder::InputString [protected] |
Definition at line 100 of file vtkInteractorEventRecorder.h.
istream* vtkInteractorEventRecorder::InputStream [protected] |
Definition at line 103 of file vtkInteractorEventRecorder.h.
ostream* vtkInteractorEventRecorder::OutputStream [protected] |
Definition at line 104 of file vtkInteractorEventRecorder.h.
int vtkInteractorEventRecorder::State [protected] |
Definition at line 119 of file vtkInteractorEventRecorder.h.
float vtkInteractorEventRecorder::StreamVersion [static, protected] |
Definition at line 128 of file vtkInteractorEventRecorder.h.