00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00039
#ifndef __vtkWin32RenderWindowInteractor_h
00040
#define __vtkWin32RenderWindowInteractor_h
00041
00042
#include "vtkRenderWindowInteractor.h"
00043
00044 class VTK_RENDERING_EXPORT vtkWin32RenderWindowInteractor :
public vtkRenderWindowInteractor
00045 {
00046
public:
00048
static vtkWin32RenderWindowInteractor *
New();
00049
00050 vtkTypeRevisionMacro(vtkWin32RenderWindowInteractor,
vtkRenderWindowInteractor);
00051
void PrintSelf(ostream& os,
vtkIndent indent);
00052
00054
virtual void Initialize();
00055
00057
00064
virtual void Enable();
00065
virtual void Disable();
00067
00071
virtual void Start();
00072
00074
00079 vtkSetMacro(InstallMessageProc,
int);
00080 vtkGetMacro(InstallMessageProc,
int);
00081 vtkBooleanMacro(InstallMessageProc,
int);
00083
00088
void TerminateApp(
void);
00089
00091
00092
int CreateTimer(
int timertype);
00093
int DestroyTimer(
void);
00095
00096
00097
friend VTK_RENDERING_EXPORT LRESULT CALLBACK vtkHandleMessage(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l);
00098
friend VTK_RENDERING_EXPORT LRESULT CALLBACK vtkHandleMessage2(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l, vtkWin32RenderWindowInteractor *me);
00099
00101
00103
virtual void OnMouseMove (HWND wnd, UINT nFlags,
int X,
int Y);
00104
virtual void OnNCMouseMove(HWND wnd, UINT nFlags,
int X,
int Y);
00105
virtual void OnRButtonDown(HWND wnd, UINT nFlags,
int X,
int Y);
00106
virtual void OnRButtonUp (HWND wnd, UINT nFlags,
int X,
int Y);
00107
virtual void OnMButtonDown(HWND wnd, UINT nFlags,
int X,
int Y);
00108
virtual void OnMButtonUp (HWND wnd, UINT nFlags,
int X,
int Y);
00109
virtual void OnLButtonDown(HWND wnd, UINT nFlags,
int X,
int Y);
00110
virtual void OnLButtonUp (HWND wnd, UINT nFlags,
int X,
int Y);
00111
virtual void OnSize (HWND wnd, UINT nType,
int X,
int Y);
00112
virtual void OnTimer (HWND wnd, UINT nIDEvent);
00113
virtual void OnKeyDown (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00114
virtual void OnKeyUp (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00115
virtual void OnChar (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
00116
00118
00120
00124
static void SetClassExitMethod(
void (*f)(
void *),
void *arg);
00125
static void SetClassExitMethodArgDelete(
void (*f)(
void *));
00127
00130
virtual void ExitCallback();
00131
00132
protected:
00133 vtkWin32RenderWindowInteractor();
00134 ~vtkWin32RenderWindowInteractor();
00135
00136 HWND WindowId;
00137 UINT TimerId;
00138 WNDPROC OldProc;
00139 int InstallMessageProc;
00140
00141 int MouseInWindow;
00142
00143
00145
00148
static void (*ClassExitMethod)(
void *);
00149
static void (*ClassExitMethodArgDelete)(
void *);
00150 static void *ClassExitMethodArg;
00151
00153
00154
private:
00155 vtkWin32RenderWindowInteractor(
const vtkWin32RenderWindowInteractor&);
00156
void operator=(
const vtkWin32RenderWindowInteractor&);
00157 };
00158
00159
#endif
00160