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 =========================================================================*/
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 
71  virtual void Start();
72 
74 
79  vtkSetMacro(InstallMessageProc,int);
80  vtkGetMacro(InstallMessageProc,int);
81  vtkBooleanMacro(InstallMessageProc,int);
83 
88  void TerminateApp(void);
89 
90  //BTX
91  friend VTKRENDERINGOPENGL_EXPORT LRESULT CALLBACK vtkHandleMessage(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l);
92  friend VTKRENDERINGOPENGL_EXPORT LRESULT CALLBACK vtkHandleMessage2(HWND hwnd,UINT uMsg, WPARAM w, LPARAM l, vtkWin32RenderWindowInteractor *me);
93 
95 
97  virtual void OnMouseMove (HWND wnd, UINT nFlags, int X, int Y);
98  virtual void OnNCMouseMove(HWND wnd, UINT nFlags, int X, int Y);
99  virtual void OnRButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
100  virtual void OnRButtonUp (HWND wnd, UINT nFlags, int X, int Y);
101  virtual void OnMButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
102  virtual void OnMButtonUp (HWND wnd, UINT nFlags, int X, int Y);
103  virtual void OnLButtonDown(HWND wnd, UINT nFlags, int X, int Y, int repeat=0);
104  virtual void OnLButtonUp (HWND wnd, UINT nFlags, int X, int Y);
105  virtual void OnSize (HWND wnd, UINT nType, int X, int Y);
106  virtual void OnTimer (HWND wnd, UINT nIDEvent);
107  virtual void OnKeyDown (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
108  virtual void OnKeyUp (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
109  virtual void OnChar (HWND wnd, UINT nChar, UINT nRepCnt, UINT nFlags);
110  virtual void OnMouseWheelForward (HWND wnd, UINT nFlags, int X, int Y);
111  virtual void OnMouseWheelBackward(HWND wnd, UINT nFlags, int X, int Y);
112  virtual void OnFocus(HWND wnd, UINT nFlags);
113  virtual void OnKillFocus(HWND wnd, UINT nFlags);
114  //ETX
116 
118 
122  static void SetClassExitMethod(void (*f)(void *), void *arg);
123  static void SetClassExitMethodArgDelete(void (*f)(void *));
125 
128  virtual void ExitCallback();
129 
130 protected:
133 
134  HWND WindowId;
135  WNDPROC OldProc;
139 
140  //BTX
142 
145  static void (*ClassExitMethod)(void *);
146  static void (*ClassExitMethodArgDelete)(void *);
147  static void *ClassExitMethodArg;
148  //ETX
150 
152 
154  virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
155  virtual int InternalDestroyTimer(int platformTimerId);
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.
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