VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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 
38 #include "vtkRenderingOpenGLModule.h" // For export macro
40 #include "vtkWindows.h" // For windows API.
41 
42 #include "vtkTDxConfigure.h" // defines VTK_USE_TDX
43 #ifdef VTK_USE_TDX
44 class vtkTDxWinDevice;
45 #endif
46 
48 {
49 public:
52 
54  void PrintSelf(ostream& os, vtkIndent indent);
55 
57  virtual void Initialize();
58 
60 
67  virtual void Enable();
68  virtual void Disable();
70 
74  virtual void Start();
75 
77 
82  vtkSetMacro(InstallMessageProc,int);
83  vtkGetMacro(InstallMessageProc,int);
84  vtkBooleanMacro(InstallMessageProc,int);
86 
91  void TerminateApp(void);
92 
93  //BTX
94  friend VTKRENDERINGOPENGL_EXPORT LRESULT CALLBACK vtkHandleMessage(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l);
95  friend VTKRENDERINGOPENGL_EXPORT LRESULT CALLBACK vtkHandleMessage2(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l, vtkWin32RenderWindowInteractor *me);
96 
98 
100  virtual void OnMouseMove (HWND wnd, UINT nFlags, int X, int Y);
101  virtual void OnNCMouseMove(HWND wnd, UINT nFlags, int X, int Y);
102  virtual void OnRButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
103  virtual void OnRButtonUp (HWND wnd, UINT nFlags, int X, int Y);
104  virtual void OnMButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
105  virtual void OnMButtonUp (HWND wnd, UINT nFlags, int X, int Y);
106  virtual void OnLButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
107  virtual void OnLButtonUp (HWND wnd, UINT nFlags, int X, int Y);
108  virtual void OnSize (HWND wnd, UINT nType, int X, int Y);
109  virtual void OnTimer (HWND wnd, UINT nIDEvent);
110  virtual void OnKeyDown (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
111  virtual void OnKeyUp (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
112  virtual void OnChar (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
113  virtual void OnMouseWheelForward (HWND wnd, UINT nFlags, int X, int Y);
114  virtual void OnMouseWheelBackward(HWND wnd, UINT nFlags, int X, int Y);
115  virtual void OnFocus(HWND wnd, UINT nFlags);
116  virtual void OnKillFocus(HWND wnd, UINT nFlags);
117  //ETX
119 
121 
125  static void SetClassExitMethod(void (*f)(void *), void *arg);
126  static void SetClassExitMethodArgDelete(void (*f)(void *));
128 
131  virtual void ExitCallback();
132 
133 protected:
136 
137  HWND WindowId;
138  WNDPROC OldProc;
142 
143  //BTX
145 
148  static void (*ClassExitMethod)(void *);
149  static void (*ClassExitMethodArgDelete)(void *);
150  static void *ClassExitMethodArg;
151  //ETX
153 
155 
157  virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
158  virtual int InternalDestroyTimer(int platformTimerId);
160 
161 #ifdef VTK_USE_TDX
162  vtkTDxWinDevice *Device;
163 #endif
164 
165 private:
167  void operator=(const vtkWin32RenderWindowInteractor&); // Not implemented.
168 };
169 
170 #endif
171 
Implementation of vtkTDxDevice on Windows.
GLclampf f
Definition: vtkgl.h:14181
virtual int InternalDestroyTimer(int platformTimerId)
void PrintSelf(ostream &os, vtkIndent indent)
virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration)
#define vtkGetMacro(name, type)
Definition: vtkSetGet.h:83
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
implements Win32 specific functions required by vtkRenderWindowInteractor.
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:619
virtual void Initialize()
static vtkRenderWindowInteractor * New()
platform-independent render window interaction including picking and frame rate control.
GLubyte GLubyte GLubyte GLubyte w
Definition: vtkgl.h:12054
a simple class to control print indentation
Definition: vtkIndent.h:38
virtual void ExitCallback()
#define VTKRENDERINGOPENGL_EXPORT
#define vtkBooleanMacro(name, type)
Definition: vtkSetGet.h:234
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69