00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00052 #ifndef __vtkWin32RenderWindowInteractor_h
00053 #define __vtkWin32RenderWindowInteractor_h
00054
00055 #include "vtkRenderWindowInteractor.h"
00056
00057 class VTK_RENDERING_EXPORT vtkWin32RenderWindowInteractor : public vtkRenderWindowInteractor
00058 {
00059 public:
00061 static vtkWin32RenderWindowInteractor *New();
00062
00063 vtkTypeRevisionMacro(vtkWin32RenderWindowInteractor,vtkRenderWindowInteractor);
00064 void PrintSelf(ostream& os, vtkIndent indent);
00065
00067 virtual void Initialize();
00068
00070
00077 virtual void Enable();
00078 virtual void Disable();
00080
00084 virtual void Start();
00085
00087
00092 vtkSetMacro(InstallMessageProc,int);
00093 vtkGetMacro(InstallMessageProc,int);
00094 vtkBooleanMacro(InstallMessageProc,int);
00096
00101 void TerminateApp(void);
00102
00104
00105 int CreateTimer(int timertype);
00106 int DestroyTimer(void);
00108
00109
00110 friend VTK_RENDERING_EXPORT LRESULT CALLBACK vtkHandleMessage(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l);
00111 friend VTK_RENDERING_EXPORT LRESULT CALLBACK vtkHandleMessage2(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l, vtkWin32RenderWindowInteractor *me);
00112
00114
00116 virtual void OnMouseMove (HWND wnd, UINT nFlags, int X, int Y);
00117 virtual void OnNCMouseMove(HWND wnd, UINT nFlags, int X, int Y);
00118 virtual void OnRButtonDown(HWND wnd, UINT nFlags, int X, int Y);
00119 virtual void OnRButtonUp (HWND wnd, UINT nFlags, int X, int Y);
00120 virtual void OnMButtonDown(HWND wnd, UINT nFlags, int X, int Y);
00121 virtual void OnMButtonUp (HWND wnd, UINT nFlags, int X, int Y);
00122 virtual void OnLButtonDown(HWND wnd, UINT nFlags, int X, int Y);
00123 virtual void OnLButtonUp (HWND wnd, UINT nFlags, int X, int Y);
00124 virtual void OnSize (HWND wnd, UINT nType, int X, int Y);
00125 virtual void OnTimer (HWND wnd, UINT nIDEvent);
00126 virtual void OnKeyDown (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00127 virtual void OnKeyUp (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00128 virtual void OnChar (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00129
00131
00133
00134 only used if no instance level ExitMethod has been defined. It is
00135 provided as a means to control how an interactor is exited given the
00136 various language bindings (tcl, Win32, etc.). */
00137 static void SetClassExitMethod(void (*f)(void *), void *arg);
00138 static void SetClassExitMethodArgDelete(void (*f)(void *));
00140
00143 virtual void ExitCallback();
00144
00145 protected:
00146 vtkWin32RenderWindowInteractor();
00147 ~vtkWin32RenderWindowInteractor();
00148
00149 HWND WindowId;
00150 UINT TimerId;
00151 WNDPROC OldProc;
00152 int InstallMessageProc;
00153
00154 int MouseInWindow;
00155
00156
00158
00159 to set different exit methods for various language bindings, i.e.
00160 tcl, java, Win32) */
00161 static void (*ClassExitMethod)(void *);
00162 static void (*ClassExitMethodArgDelete)(void *);
00163 static void *ClassExitMethodArg;
00164
00166
00167 private:
00168 vtkWin32RenderWindowInteractor(const vtkWin32RenderWindowInteractor&);
00169 void operator=(const vtkWin32RenderWindowInteractor&);
00170 };
00171
00172 #endif
00173