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 =========================================================================*/
32 #ifndef vtkWin32RenderWindowInteractor_h
33 #define vtkWin32RenderWindowInteractor_h
34 
35 #include "vtkRenderingOpenGLModule.h" // For export macro
37 #include "vtkWindows.h" // For windows API.
38 
39 #include "vtkTDxConfigure.h" // defines VTK_USE_TDX
40 #ifdef VTK_USE_TDX
41 class vtkTDxWinDevice;
42 #endif
43 
45 {
46 public:
49 
51  void PrintSelf(ostream& os, vtkIndent indent);
52 
54  virtual void Initialize();
55 
57 
64  virtual void Enable();
65  virtual void Disable();
67 
69 
74  vtkSetMacro(InstallMessageProc,int);
75  vtkGetMacro(InstallMessageProc,int);
76  vtkBooleanMacro(InstallMessageProc,int);
78 
83  void TerminateApp(void);
84 
85  //BTX
86  friend VTKRENDERINGOPENGL_EXPORT LRESULT CALLBACK vtkHandleMessage(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l);
87  friend VTKRENDERINGOPENGL_EXPORT LRESULT CALLBACK vtkHandleMessage2(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l, vtkWin32RenderWindowInteractor *me);
88 
90 
92  virtual void OnMouseMove (HWND wnd, UINT nFlags, int X, int Y);
93  virtual void OnNCMouseMove(HWND wnd, UINT nFlags, int X, int Y);
94  virtual void OnRButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
95  virtual void OnRButtonUp (HWND wnd, UINT nFlags, int X, int Y);
96  virtual void OnMButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
97  virtual void OnMButtonUp (HWND wnd, UINT nFlags, int X, int Y);
98  virtual void OnLButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
99  virtual void OnLButtonUp (HWND wnd, UINT nFlags, int X, int Y);
100  virtual void OnSize (HWND wnd, UINT nType, int X, int Y);
101  virtual void OnTimer (HWND wnd, UINT nIDEvent);
102  virtual void OnKeyDown (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
103  virtual void OnKeyUp (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
104  virtual void OnChar (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
105  virtual void OnMouseWheelForward (HWND wnd, UINT nFlags, int X, int Y);
106  virtual void OnMouseWheelBackward(HWND wnd, UINT nFlags, int X, int Y);
107  virtual void OnFocus(HWND wnd, UINT nFlags);
108  virtual void OnKillFocus(HWND wnd, UINT nFlags);
109  //ETX
111 
113 
117  static void SetClassExitMethod(void (*f)(void *), void *arg);
118  static void SetClassExitMethodArgDelete(void (*f)(void *));
120 
123  virtual void ExitCallback();
124 
125 protected:
128 
129  HWND WindowId;
130  WNDPROC OldProc;
134 
135  //BTX
137 
140  static void (*ClassExitMethod)(void *);
141  static void (*ClassExitMethodArgDelete)(void *);
142  static void *ClassExitMethodArg;
143  //ETX
145 
147 
149  virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
150  virtual int InternalDestroyTimer(int platformTimerId);
152 
156  virtual void StartEventLoop();
157 
158 #ifdef VTK_USE_TDX
159  vtkTDxWinDevice *Device;
160 #endif
161 
162 private:
164  void operator=(const vtkWin32RenderWindowInteractor&); // Not implemented.
165 };
166 
167 #endif
168 
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:38
virtual void ExitCallback()
#define VTKRENDERINGOPENGL_EXPORT