VTK
vtkWin32RenderWindowInteractor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkWin32RenderWindowInteractor.h
5 
6  Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
7  All rights reserved.
8  See Copyright.txt or http://www.kitware.com/Copyright.htm for details.
9 
10  This software is distributed WITHOUT ANY WARRANTY; without even
11  the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
12  PURPOSE. See the above copyright notice for more information.
13 
14 =========================================================================*/
35 #ifndef __vtkWin32RenderWindowInteractor_h
36 #define __vtkWin32RenderWindowInteractor_h
37 
39 #include "vtkWindows.h" // For windows API.
40 
41 #include "vtkTDxConfigure.h" // defines VTK_USE_TDX
42 #ifdef VTK_USE_TDX
43 class vtkTDxWinDevice;
44 #endif
45 
47 {
48 public:
51 
53  void PrintSelf(ostream& os, vtkIndent indent);
54 
56  virtual void Initialize();
57 
59 
66  virtual void Enable();
67  virtual void Disable();
69 
73  virtual void Start();
74 
76 
81  vtkSetMacro(InstallMessageProc,int);
82  vtkGetMacro(InstallMessageProc,int);
83  vtkBooleanMacro(InstallMessageProc,int);
85 
90  void TerminateApp(void);
91 
92  //BTX
93  friend VTK_RENDERING_EXPORT LRESULT CALLBACK vtkHandleMessage(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l);
94  friend VTK_RENDERING_EXPORT LRESULT CALLBACK vtkHandleMessage2(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l, vtkWin32RenderWindowInteractor *me);
95 
97 
99  virtual void OnMouseMove (HWND wnd, UINT nFlags, int X, int Y);
100  virtual void OnNCMouseMove(HWND wnd, UINT nFlags, int X, int Y);
101  virtual void OnRButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
102  virtual void OnRButtonUp (HWND wnd, UINT nFlags, int X, int Y);
103  virtual void OnMButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
104  virtual void OnMButtonUp (HWND wnd, UINT nFlags, int X, int Y);
105  virtual void OnLButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
106  virtual void OnLButtonUp (HWND wnd, UINT nFlags, int X, int Y);
107  virtual void OnSize (HWND wnd, UINT nType, int X, int Y);
108  virtual void OnTimer (HWND wnd, UINT nIDEvent);
109  virtual void OnKeyDown (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
110  virtual void OnKeyUp (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
111  virtual void OnChar (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
112  virtual void OnMouseWheelForward (HWND wnd, UINT nFlags, int X, int Y);
113  virtual void OnMouseWheelBackward(HWND wnd, UINT nFlags, int X, int Y);
114  virtual void OnFocus(HWND wnd, UINT nFlags);
115  virtual void OnKillFocus(HWND wnd, UINT nFlags);
116  //ETX
118 
120 
124  static void SetClassExitMethod(void (*f)(void *), void *arg);
125  static void SetClassExitMethodArgDelete(void (*f)(void *));
127 
130  virtual void ExitCallback();
131 
132 protected:
135 
136  HWND WindowId;
137  WNDPROC OldProc;
141 
142  //BTX
144 
147  static void (*ClassExitMethod)(void *);
148  static void (*ClassExitMethodArgDelete)(void *);
149  static void *ClassExitMethodArg;
150  //ETX
152 
154 
156  virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
157  virtual int InternalDestroyTimer(int platformTimerId);
159 
160 #ifdef VTK_USE_TDX
161  vtkTDxWinDevice *Device;
162 #endif
163 
164 private:
166  void operator=(const vtkWin32RenderWindowInteractor&); // Not implemented.
167 };
168 
169 #endif
170 
Implementation of vtkTDxDevice on Windows.
virtual int InternalDestroyTimer(int platformTimerId)
void PrintSelf(ostream &os, vtkIndent indent)
virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration)
implements Win32 specific functions required by vtkRenderWindowInteractor.
virtual void Initialize()
static vtkRenderWindowInteractor * New()
platform-independent render window interaction including picking and frame rate control.
a simple class to control print indentation
Definition: vtkIndent.h:37
virtual void ExitCallback()
#define VTK_RENDERING_EXPORT