VTK
Public Types | Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
vtkInteractorEventRecorder Class Reference

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

#include <vtkInteractorEventRecorder.h>

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

Public Types

typedef vtkInteractorObserver Superclass
 
- Public Types inherited from vtkInteractorObserver
typedef vtkObject Superclass
 
- Public Types inherited from vtkObject
typedef vtkObjectBase 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 ()
 
- Public Member Functions inherited from vtkInteractorObserver
vtkInteractorObserverNewInstance () const
 
void PrintSelf (ostream &os, vtkIndent indent)
 
virtual void OnChar ()
 
int GetEnabled ()
 
void EnabledOn ()
 
void EnabledOff ()
 
void On ()
 
void Off ()
 
virtual vtkRenderWindowInteractorGetInteractor ()
 
virtual void SetPriority (float)
 
virtual float GetPriority ()
 
virtual void PickingManagedOn ()
 
virtual void PickingManagedOff ()
 
virtual void SetPickingManaged (bool)
 
virtual bool GetPickingManaged ()
 
virtual void SetKeyPressActivation (int)
 
virtual int GetKeyPressActivation ()
 
virtual void KeyPressActivationOn ()
 
virtual void KeyPressActivationOff ()
 
virtual void SetKeyPressActivationValue (char)
 
virtual char GetKeyPressActivationValue ()
 
virtual vtkRendererGetDefaultRenderer ()
 
virtual void SetDefaultRenderer (vtkRenderer *)
 
virtual vtkRendererGetCurrentRenderer ()
 
virtual void SetCurrentRenderer (vtkRenderer *)
 
void GrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void ReleaseFocus ()
 
- Public Member Functions inherited from vtkObject
vtkObjectNewInstance () const
 
virtual void DebugOn ()
 
virtual void DebugOff ()
 
bool GetDebug ()
 
void SetDebug (bool debugFlag)
 
virtual void Modified ()
 
virtual unsigned long GetMTime ()
 
unsigned long AddObserver (unsigned long event, vtkCommand *, float priority=0.0f)
 
unsigned long AddObserver (const char *event, vtkCommand *, float priority=0.0f)
 
vtkCommandGetCommand (unsigned long tag)
 
void RemoveObserver (vtkCommand *)
 
void RemoveObservers (unsigned long event, vtkCommand *)
 
void RemoveObservers (const char *event, vtkCommand *)
 
int HasObserver (unsigned long event, vtkCommand *)
 
int HasObserver (const char *event, vtkCommand *)
 
void RemoveObserver (unsigned long tag)
 
void RemoveObservers (unsigned long event)
 
void RemoveObservers (const char *event)
 
void RemoveAllObservers ()
 
int HasObserver (unsigned long event)
 
int HasObserver (const char *event)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, void(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
template<class U , class T >
unsigned long AddObserver (unsigned long event, U observer, bool(T::*callback)(vtkObject *, unsigned long, void *), float priority=0.0f)
 
int InvokeEvent (unsigned long event, void *callData)
 
int InvokeEvent (const char *event, void *callData)
 
int InvokeEvent (unsigned long event)
 
int InvokeEvent (const char *event)
 
- Public Member Functions inherited from vtkObjectBase
const char * GetClassName () const
 
virtual void Delete ()
 
virtual void FastDelete ()
 
void Print (ostream &os)
 
virtual void Register (vtkObjectBase *o)
 
virtual void UnRegister (vtkObjectBase *o)
 
void SetReferenceCount (int)
 
void PrintRevisions (ostream &)
 
virtual void PrintHeader (ostream &os, vtkIndent indent)
 
virtual void PrintTrailer (ostream &os, vtkIndent indent)
 
int GetReferenceCount ()
 

Static Public Member Functions

static vtkInteractorEventRecorderNew ()
 
static int IsTypeOf (const char *type)
 
static vtkInteractorEventRecorderSafeDownCast (vtkObjectBase *o)
 
- Static Public Member Functions inherited from vtkInteractorObserver
static int IsTypeOf (const char *type)
 
static vtkInteractorObserverSafeDownCast (vtkObjectBase *o)
 
static void ComputeDisplayToWorld (vtkRenderer *ren, double x, double y, double z, double worldPt[4])
 
static void ComputeWorldToDisplay (vtkRenderer *ren, double x, double y, double z, double displayPt[3])
 
- Static Public Member Functions inherited from vtkObject
static int IsTypeOf (const char *type)
 
static vtkObjectSafeDownCast (vtkObjectBase *o)
 
static vtkObjectNew ()
 
static void BreakOnError ()
 
static void SetGlobalWarningDisplay (int val)
 
static void GlobalWarningDisplayOn ()
 
static void GlobalWarningDisplayOff ()
 
static int GetGlobalWarningDisplay ()
 
- Static Public Member Functions inherited from vtkObjectBase
static int IsTypeOf (const char *name)
 
static vtkObjectBaseNew ()
 

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 ()
 
- Protected Member Functions inherited from vtkInteractorObserver
 vtkInteractorObserver ()
 
 ~vtkInteractorObserver ()
 
virtual void RegisterPickers ()
 
void UnRegisterPickers ()
 
virtual void PickersModified ()
 
vtkPickingManagerGetPickingManager ()
 
int RequestCursorShape (int requestedShape)
 
virtual void StartInteraction ()
 
virtual void EndInteraction ()
 
void ComputeDisplayToWorld (double x, double y, double z, double worldPt[4])
 
void ComputeWorldToDisplay (double x, double y, double z, double displayPt[3])
 
vtkAssemblyPathGetAssemblyPath (double X, double Y, double Z, vtkAbstractPropPicker *picker)
 
- Protected Member Functions inherited from vtkObject
 vtkObject ()
 
virtual ~vtkObject ()
 
virtual void RegisterInternal (vtkObjectBase *, int check)
 
virtual void UnRegisterInternal (vtkObjectBase *, int check)
 
void InternalGrabFocus (vtkCommand *mouseEvents, vtkCommand *keypressEvents=NULL)
 
void InternalReleaseFocus ()
 
- Protected Member Functions inherited from vtkObjectBase
 vtkObjectBase ()
 
virtual ~vtkObjectBase ()
 
virtual void CollectRevisions (ostream &)
 
virtual void ReportReferences (vtkGarbageCollector *)
 
 vtkObjectBase (const vtkObjectBase &)
 
void operator= (const vtkObjectBase &)
 

Static Protected Member Functions

static void ProcessCharEvent (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
 
static void ProcessDeleteEvent (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
 
static void ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
 
- Static Protected Member Functions inherited from vtkInteractorObserver
static void ProcessEvents (vtkObject *object, unsigned long event, void *clientdata, void *calldata)
 

Protected Attributes

char * FileName
 
vtkCallbackCommandDeleteEventCallbackCommand
 
int ReadFromInputString
 
char * InputString
 
istream * InputStream
 
ostream * OutputStream
 
int State
 
- Protected Attributes inherited from vtkInteractorObserver
int Enabled
 
vtkCallbackCommandEventCallbackCommand
 
vtkCallbackCommandKeyPressCallbackCommand
 
float Priority
 
bool PickingManaged
 
int KeyPressActivation
 
char KeyPressActivationValue
 
vtkRenderWindowInteractorInteractor
 
vtkRendererCurrentRenderer
 
vtkRendererDefaultRenderer
 
unsigned long CharObserverTag
 
unsigned long DeleteObserverTag
 
vtkObserverMediatorObserverMediator
 
- Protected Attributes inherited from vtkObject
bool Debug
 
vtkTimeStamp MTime
 
vtkSubjectHelper * SubjectHelper
 
- Protected Attributes inherited from vtkObjectBase
vtkAtomicInt32 ReferenceCount
 
vtkWeakPointerBase ** WeakPointers
 

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::EnableEvent vtkCommand::DisableEvent
Tests:
vtkInteractorEventRecorder (Tests)

Definition at line 46 of file vtkInteractorEventRecorder.h.

Member Typedef Documentation

Definition at line 50 of file vtkInteractorEventRecorder.h.

Member Enumeration Documentation

Enumerator
Start 
Playing 
Recording 

Definition at line 125 of file vtkInteractorEventRecorder.h.

Constructor & Destructor Documentation

vtkInteractorEventRecorder::vtkInteractorEventRecorder ( )
protected
vtkInteractorEventRecorder::~vtkInteractorEventRecorder ( )
protected

Member Function Documentation

static vtkInteractorEventRecorder* vtkInteractorEventRecorder::New ( )
static
static int vtkInteractorEventRecorder::IsTypeOf ( const char *  type)
static
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
virtual vtkObjectBase* vtkInteractorEventRecorder::NewInstanceInternal ( ) const
protectedvirtual

Reimplemented from vtkInteractorObserver.

vtkInteractorEventRecorder* vtkInteractorEventRecorder::NewInstance ( ) const
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 vtkObject.

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 
)
staticprotected
static void vtkInteractorEventRecorder::ProcessDeleteEvent ( vtkObject object,
unsigned long  event,
void *  clientdata,
void *  calldata 
)
staticprotected
static void vtkInteractorEventRecorder::ProcessEvents ( vtkObject object,
unsigned long  event,
void *  clientdata,
void *  calldata 
)
staticprotected
virtual void vtkInteractorEventRecorder::WriteEvent ( const char *  event,
int  pos[2],
int  ctrlKey,
int  shiftKey,
int  keyCode,
int  repeatCount,
char *  keySym 
)
protectedvirtual
virtual void vtkInteractorEventRecorder::ReadEvent ( )
protectedvirtual

Member Data Documentation

char* vtkInteractorEventRecorder::FileName
protected

Definition at line 96 of file vtkInteractorEventRecorder.h.

vtkCallbackCommand* vtkInteractorEventRecorder::DeleteEventCallbackCommand
protected

Definition at line 99 of file vtkInteractorEventRecorder.h.

int vtkInteractorEventRecorder::ReadFromInputString
protected

Definition at line 102 of file vtkInteractorEventRecorder.h.

char* vtkInteractorEventRecorder::InputString
protected

Definition at line 103 of file vtkInteractorEventRecorder.h.

istream* vtkInteractorEventRecorder::InputStream
protected

Definition at line 106 of file vtkInteractorEventRecorder.h.

ostream* vtkInteractorEventRecorder::OutputStream
protected

Definition at line 107 of file vtkInteractorEventRecorder.h.

int vtkInteractorEventRecorder::State
protected

Definition at line 124 of file vtkInteractorEventRecorder.h.

float vtkInteractorEventRecorder::StreamVersion
staticprotected

Definition at line 133 of file vtkInteractorEventRecorder.h.


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