VTK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
vtkCocoaRenderWindowInteractor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkCocoaRenderWindowInteractor.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 __vtkCocoaRenderWindowInteractor_h
29 #define __vtkCocoaRenderWindowInteractor_h
30 
31 #include "vtkRenderingOpenGLModule.h" // For export macro
33 #include "vtkTDxConfigure.h" // defines VTK_USE_TDX
34 #ifdef VTK_USE_TDX
35 class vtkTDxMacDevice;
36 #endif
37 
39 {
40 public:
43 
45  void PrintSelf(ostream& os, vtkIndent indent);
46 
48  virtual void Initialize();
49 
51 
58  virtual void Enable();
59  virtual void Disable();
61 
65  virtual void Start();
66 
68 
73  vtkSetMacro(InstallMessageProc,int);
74  vtkGetMacro(InstallMessageProc,int);
75  vtkBooleanMacro(InstallMessageProc,int);
77 
82  void TerminateApp();
83 
85 
89  static void SetClassExitMethod(void (*f)(void *), void *arg);
90  static void SetClassExitMethodArgDelete(void (*f)(void *));
92 
95  virtual void ExitCallback();
96 
97 // int GetButtonDown();
98 // void SetButtonDown(int button);
99 
100 protected:
103 
105 
107 
109  void SetTimerDictionary(void *dictionary); // Really an NSMutableDictionary*
110  void *GetTimerDictionary();
111  void SetCocoaServer(void *server); // Really a vtkCocoaServer*
112  void *GetCocoaServer();
114 
115  //BTX
117 
120  static void (*ClassExitMethod)(void *);
121  static void (*ClassExitMethodArgDelete)(void *);
122  static void *ClassExitMethodArg;
123  //ETX
125 
127 
129  virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
130  virtual int InternalDestroyTimer(int platformTimerId);
132 
134 
136  void SetCocoaManager(void *manager);
137  void *GetCocoaManager();
139 
140 #ifdef VTK_USE_TDX
141  vtkTDxMacDevice *Device;
142 #endif
143 
144 private:
146  void operator=(const vtkCocoaRenderWindowInteractor&); // Not implemented.
147 
148  // Important: this class cannot contain Objective-C instance
149  // variables for 2 reasons:
150  // 1) C++ files include this header
151  // 2) because of garbage collection
152  // Instead, use the CocoaManager dictionary to keep a collection
153  // of what would otherwise be Objective-C instance variables.
154  void *CocoaManager; // Really an NSMutableDictionary*
155 
156 };
157 
158 #endif
GLclampf f
Definition: vtkgl.h:14181
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)
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
virtual void Initialize()
static vtkRenderWindowInteractor * New()
implements Cocoa specific functions required by vtkRenderWindowInteractor.
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