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