Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages

# vtkInteractorEventRecorder Class Reference

`#include <vtkInteractorEventRecorder.h>`

Inheritance diagram for vtkInteractorEventRecorder:

[legend]
Collaboration diagram for vtkInteractorEventRecorder:

[legend]
List of all members.

## Detailed Description

record and play VTK events passing through a vtkRenderWindowInteractor

Date:
  2002/08/15 15:38:34

Revision:
  1.4

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::EnableEvent vtkCommand::DisableEvent

Created by:
  - Schroeder, Will

CVS contributions (if > 5%):
  - Schroeder, Will (86%)
  - Barre, Sebastien (13%)

CVS logs (CVSweb):
  - .`h` (`/Rendering/vtkInteractorEventRecorder.h)`
  - .`cxx` (`/Rendering/vtkInteractorEventRecorder.cxx)`

Tests:
  vtkInteractorEventRecorder (Tests)

Definition at line 60 of file vtkInteractorEventRecorder.h.

## Public Types
typedef vtkInteractorObserver | Superclass
## Public Methods
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 Methods
vtkInteractorEventRecorder * | New ()
int | IsTypeOf (const char *type)
vtkInteractorEventRecorder * | SafeDownCast (vtkObject *o)
## Protected Types
enum | WidgetState { Start = 0, Playing, Recording }
## Protected Methods
| 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 Methods
void | ProcessCharEvent (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
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
float | StreamVersion

## Member Typedef Documentation

typedef vtkInteractorObserver vtkInteractorEventRecorder::Superclass

| Reimplemented from vtkInteractorObserver. Definition at line 64 of file vtkInteractorEventRecorder.h.

## Member Enumeration Documentation

enum vtkInteractorEventRecorder::WidgetState`[protected]`

  | Enumeration values:
  Start |
  Playing |
  Recording |
Definition at line 134 of file vtkInteractorEventRecorder.h.

## Constructor & Destructor Documentation

vtkInteractorEventRecorder::vtkInteractorEventRecorder | ( |  | ) | `[protected]`

vtkInteractorEventRecorder::~vtkInteractorEventRecorder | ( |  | ) | `[protected]`

## Member Function Documentation

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.

int vtkInteractorEventRecorder::IsTypeOf | ( | const char * | type | ) | `[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 vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkInteractorObserver.

virtual int vtkInteractorEventRecorder::IsA | ( | const char * | type | ) | `[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 vtkTypeRevisionMacro found in vtkSetGet.h. Reimplemented from vtkInteractorObserver.

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()). Implements 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.

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

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

char* vtkInteractorEventRecorder::FileName`[protected]`

| Definition at line 110 of file vtkInteractorEventRecorder.h.

int vtkInteractorEventRecorder::ReadFromInputString`[protected]`

| Definition at line 113 of file vtkInteractorEventRecorder.h.

char* vtkInteractorEventRecorder::InputString`[protected]`

| Definition at line 114 of file vtkInteractorEventRecorder.h.

istream* vtkInteractorEventRecorder::InputStream`[protected]`

| Definition at line 117 of file vtkInteractorEventRecorder.h.

ostream* vtkInteractorEventRecorder::OutputStream`[protected]`

| Definition at line 118 of file vtkInteractorEventRecorder.h.

int vtkInteractorEventRecorder::State`[protected]`

| Definition at line 133 of file vtkInteractorEventRecorder.h.

float vtkInteractorEventRecorder::StreamVersion`[static, protected]`

| Definition at line 142 of file vtkInteractorEventRecorder.h.

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

- Rendering/vtkInteractorEventRecorder.h