00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00031 #ifndef __vtkXRenderWindowTclInteractor_h
00032 #define __vtkXRenderWindowTclInteractor_h
00033
00034
00035
00036
00037 #include "vtkRenderWindowInteractor.h"
00038 #include <X11/StringDefs.h>
00039 #include <X11/Intrinsic.h>
00040
00041 extern void vtkXRenderWindowTclInteractorCallback(Widget,XtPointer,
00042 XEvent *,Boolean *);
00043 extern void vtkXRenderWindowTclInteractorTimer(XtPointer,XtIntervalId *);
00044
00045 class VTK_RENDERING_EXPORT vtkXRenderWindowTclInteractor : public vtkRenderWindowInteractor
00046 {
00047 public:
00048 static vtkXRenderWindowTclInteractor *New();
00049 vtkTypeRevisionMacro(vtkXRenderWindowTclInteractor,vtkRenderWindowInteractor);
00050 void PrintSelf(ostream& os, vtkIndent indent);
00051
00055 virtual void Initialize();
00056
00058
00060 virtual void Initialize(XtAppContext app);
00061 vtkGetMacro( App, XtAppContext );
00063
00065
00072 virtual void Enable();
00073 virtual void Disable();
00075
00077
00080 virtual void Start();
00081 virtual void UpdateSize(int,int);
00083
00085
00099 virtual void SetWidget(Widget);
00100 Widget GetWidget()
00101 {return this->top;}
00103
00105
00129 virtual void SetTopLevelShell(Widget);
00130 Widget GetTopLevelShell()
00131 {return this->TopLevelShell;}
00133
00135
00136 int CreateTimer(int timertype);
00137 int DestroyTimer(void);
00139
00141 void TerminateApp(void);
00142
00144
00145 vtkGetMacro(BreakLoopFlag, int);
00146 vtkSetMacro(BreakLoopFlag, int);
00148
00150
00151 friend void vtkXRenderWindowTclInteractorCallback(Widget,XtPointer,
00152 XEvent *,Boolean *);
00153 friend void vtkXRenderWindowTclInteractorTimer(XtPointer,XtIntervalId *);
00155
00156 protected:
00157 vtkXRenderWindowTclInteractor();
00158 ~vtkXRenderWindowTclInteractor();
00159
00160 Widget TopLevelShell;
00161
00162 Display *DisplayId;
00163 Window WindowId;
00164 Atom KillAtom;
00165 Widget top;
00166 Widget oldTop;
00167 XtAppContext App;
00168 int PositionBeforeStereo[2];
00169
00170 int BreakLoopFlag;
00171 private:
00172 vtkXRenderWindowTclInteractor(const vtkXRenderWindowTclInteractor&);
00173 void operator=(const vtkXRenderWindowTclInteractor&);
00174 };
00175
00176 #endif