Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members File Members Related Pages
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
00054 #ifndef __vtkInteractorEventRecorder_h
00055 #define __vtkInteractorEventRecorder_h
00056
00057 #include "vtkInteractorObserver.h"
00058
00059
00060 class VTK_RENDERING_EXPORT vtkInteractorEventRecorder : public vtkInteractorObserver
00061 {
00062 public:
00063 static vtkInteractorEventRecorder *New();
00064 vtkTypeRevisionMacro(vtkInteractorEventRecorder,vtkInteractorObserver);
00065 void PrintSelf(ostream& os, vtkIndent indent);
00066
00067
00068 virtual void SetEnabled(int);
00069 virtual void SetInteractor(vtkRenderWindowInteractor* iren);
00070
00072
00073 vtkSetStringMacro(FileName);
00074 vtkGetStringMacro(FileName);
00076
00079 void Record();
00080
00083 void Play();
00084
00086 void Stop();
00087
00089 void Rewind();
00090
00092
00094 vtkSetMacro(ReadFromInputString,int);
00095 vtkGetMacro(ReadFromInputString,int);
00096 vtkBooleanMacro(ReadFromInputString,int);
00098
00100
00101 vtkSetStringMacro(InputString);
00102 vtkGetStringMacro(InputString);
00104
00105 protected:
00106 vtkInteractorEventRecorder();
00107 ~vtkInteractorEventRecorder();
00108
00109
00110 char *FileName;
00111
00112
00113 int ReadFromInputString;
00114 char *InputString;
00115
00116
00117 istream *InputStream;
00118 ostream *OutputStream;
00119
00120
00121 static void ProcessCharEvent(vtkObject* object, unsigned long event,
00122 void* clientdata, void* calldata);
00123 static void ProcessEvents(vtkObject* object, unsigned long event,
00124 void* clientdata, void* calldata);
00125
00126 virtual void WriteEvent(const char* event, int pos[2], int ctrlKey,
00127 int shiftKey, int keyCode, int repeatCount,
00128 char* keySym);
00129
00130 virtual void ReadEvent();
00131
00132
00133 int State;
00134 enum WidgetState
00135 {
00136 Start=0,
00137 Playing,
00138 Recording
00139 };
00140
00141
00142 static float StreamVersion;
00143
00144 private:
00145 vtkInteractorEventRecorder(const vtkInteractorEventRecorder&);
00146 void operator=(const vtkInteractorEventRecorder&);
00147
00148 };
00149
00150 #endif
00151