Rendering/vtkInteractorEventRecorder.h
Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00043 #ifndef __vtkInteractorEventRecorder_h
00044 #define __vtkInteractorEventRecorder_h
00045
00046 #include "vtkInteractorObserver.h"
00047
00048
00049 class VTK_RENDERING_EXPORT vtkInteractorEventRecorder : public vtkInteractorObserver
00050 {
00051 public:
00052 static vtkInteractorEventRecorder *New();
00053 vtkTypeRevisionMacro(vtkInteractorEventRecorder,vtkInteractorObserver);
00054 void PrintSelf(ostream& os, vtkIndent indent);
00055
00056
00057 virtual void SetEnabled(int);
00058 virtual void SetInteractor(vtkRenderWindowInteractor* iren);
00059
00061
00062 vtkSetStringMacro(FileName);
00063 vtkGetStringMacro(FileName);
00065
00068 void Record();
00069
00072 void Play();
00073
00075 void Stop();
00076
00078 void Rewind();
00079
00081
00083 vtkSetMacro(ReadFromInputString,int);
00084 vtkGetMacro(ReadFromInputString,int);
00085 vtkBooleanMacro(ReadFromInputString,int);
00087
00089
00090 vtkSetStringMacro(InputString);
00091 vtkGetStringMacro(InputString);
00093
00094 protected:
00095 vtkInteractorEventRecorder();
00096 ~vtkInteractorEventRecorder();
00097
00098
00099 char *FileName;
00100
00101
00102 int ReadFromInputString;
00103 char *InputString;
00104
00105
00106 istream *InputStream;
00107 ostream *OutputStream;
00108
00109
00110 static void ProcessCharEvent(vtkObject* object, unsigned long event,
00111 void* clientdata, void* calldata);
00112 static void ProcessEvents(vtkObject* object, unsigned long event,
00113 void* clientdata, void* calldata);
00114
00115 virtual void WriteEvent(const char* event, int pos[2], int ctrlKey,
00116 int shiftKey, int keyCode, int repeatCount,
00117 char* keySym);
00118
00119 virtual void ReadEvent();
00120
00121
00122 int State;
00123 enum WidgetState
00124 {
00125 Start=0,
00126 Playing,
00127 Recording
00128 };
00129
00130
00131 static float StreamVersion;
00132
00133 private:
00134 vtkInteractorEventRecorder(const vtkInteractorEventRecorder&);
00135 void operator=(const vtkInteractorEventRecorder&);
00136
00137 };
00138
00139 #endif
00140