VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkCarbonRenderWindowInteractor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCarbonRenderWindowInteractor.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 =========================================================================*/
28 #ifndef __vtkCarbonRenderWindowInteractor_h
29 #define __vtkCarbonRenderWindowInteractor_h
30 
31 #include "vtkRenderingOpenGLModule.h" // For export macro
33 
34 #include "vtkTDxConfigure.h" // defines VTK_USE_TDX
35 #ifdef VTK_USE_TDX
36 class vtkTDxMacDevice;
37 #endif
38 
39 #include <Carbon/Carbon.h> // Carbon and Mac specific
40 
42 {
43 public:
46 
48  void PrintSelf(ostream& os, vtkIndent indent);
49 
51  virtual void Initialize();
52 
54 
61  virtual void Enable();
62  virtual void Disable();
64 
68  virtual void Start();
69 
71 
76  vtkSetMacro(InstallMessageProc,int);
77  vtkGetMacro(InstallMessageProc,int);
78  vtkBooleanMacro(InstallMessageProc,int);
80 
85  void TerminateApp(void);
86 
88 
92  static void SetClassExitMethod(void (*f)(void *), void *arg);
93  static void SetClassExitMethodArgDelete(void (*f)(void *));
95 
98  virtual void ExitCallback();
99 
101 
103  void GetLastMouseDelta(int delta[2]) {
104  delta[0] = this->LastMouseDelta[0]; delta[1] = this->LastMouseDelta[1]; };
105  void SetLastMouseDelta(int deltaX, int deltaY) {
106  this->LastMouseDelta[0] = deltaX; this->LastMouseDelta[1] = deltaY; };
108 
110 
115  this->MouseInsideWindow = val; };
117  return this->MouseInsideWindow; };
119 
121 
125  this->MouseButtonDown = val; };
127  return this->MouseButtonDown; };
129 
130 protected:
133 
134  EventHandlerUPP ViewProcUPP;
135  EventHandlerUPP WindowProcUPP;
137 
138  // For generating event info that Carbon doesn't
139  int LastMouseDelta[2];
143 
144  //BTX
146 
149  static void (*ClassExitMethod)(void *);
150  static void (*ClassExitMethodArgDelete)(void *);
151  static void *ClassExitMethodArg;
152  //ETX
154 
156 
158  virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
159  virtual int InternalDestroyTimer(int platformTimerId);
161 
162 #ifdef VTK_USE_TDX
163  vtkTDxMacDevice *Device;
164 #endif
165 
166 private:
168  void operator=(const vtkCarbonRenderWindowInteractor&); // Not implemented.
169 };
170 
171 #endif
GLclampf f
Definition: vtkgl.h:14181
void SetLastMouseDelta(int deltaX, int deltaY)
Implementation of vtkTDxDevice on Mac.
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
#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.
implements Carbon specific functions required by vtkRenderWindowInteractor.
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
GLuint GLfloat * val
Definition: vtkgl.h:13789
#define vtkSetMacro(name, type)
Definition: vtkSetGet.h:69