VTK
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 =========================================================================*/
32 #ifndef vtkCocoaRenderWindowInteractor_h
33 #define vtkCocoaRenderWindowInteractor_h
34 
35 #include "vtkRenderingOpenGL2Module.h" // For export macro
37 #include "vtkTDxConfigure.h" // defines VTK_USE_TDX
38 #ifdef VTK_USE_TDX
39 class vtkTDxMacDevice;
40 #endif
41 
42 class VTKRENDERINGOPENGL2_EXPORT vtkCocoaRenderWindowInteractor : public vtkRenderWindowInteractor
43 {
44 public:
47 
49  void PrintSelf(ostream& os, vtkIndent indent);
50 
52  virtual void Initialize();
53 
55 
62  virtual void Enable();
63  virtual void Disable();
65 
70  void TerminateApp();
71 
73 
77  static void SetClassExitMethod(void (*f)(void *), void *arg);
78  static void SetClassExitMethodArgDelete(void (*f)(void *));
80 
83  virtual void ExitCallback();
84 
85 // int GetButtonDown();
86 // void SetButtonDown(int button);
87 
88 protected:
91 
93 
95  void SetTimerDictionary(void *dictionary); // Really an NSMutableDictionary*
98 
100 
103  static void (*ClassExitMethod)(void *);
104  static void (*ClassExitMethodArgDelete)(void *);
105  static void *ClassExitMethodArg;
107 
109 
111  virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
112  virtual int InternalDestroyTimer(int platformTimerId);
114 
118  virtual void StartEventLoop();
119 
121 
123  void SetCocoaManager(void *manager);
126 
127 #ifdef VTK_USE_TDX
128  vtkTDxMacDevice *Device;
129 #endif
130 
131 private:
133  void operator=(const vtkCocoaRenderWindowInteractor&); // Not implemented.
134 
135  // Important: this class cannot contain Objective-C instance
136  // variables for 2 reasons:
137  // 1) C++ files include this header
138  // 2) because of garbage collection
139  // Instead, use the CocoaManager dictionary to keep a collection
140  // of what would otherwise be Objective-C instance variables.
141  void *CocoaManager; // Really an NSMutableDictionary*
142 
143 };
144 
145 #endif
vtkCocoaRenderWindowInteractor::SetCocoaManager
void SetCocoaManager(void *manager)
vtkCocoaRenderWindowInteractor::New
static vtkCocoaRenderWindowInteractor * New()
vtkCocoaRenderWindowInteractor::Disable
virtual void Disable()
vtkCocoaRenderWindowInteractor::InternalDestroyTimer
virtual int InternalDestroyTimer(int platformTimerId)
vtkTypeMacro
#define vtkTypeMacro(thisClass, superclass)
Definition: vtkSetGet.h:642
vtkCocoaRenderWindowInteractor::~vtkCocoaRenderWindowInteractor
~vtkCocoaRenderWindowInteractor()
vtkTDxMacDevice
Implementation of vtkTDxDevice on Mac.
Definition: vtkTDxMacDevice.h:36
vtkCocoaRenderWindowInteractor
implements Cocoa specific functions required by vtkRenderWindowInteractor.
Definition: vtkCocoaRenderWindowInteractor.h:43
vtkCocoaRenderWindowInteractor::StartEventLoop
virtual void StartEventLoop()
vtkCocoaRenderWindowInteractor::Enable
virtual void Enable()
vtkCocoaRenderWindowInteractor::TerminateApp
void TerminateApp()
vtkCocoaRenderWindowInteractor::InternalCreateTimer
virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration)
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:39
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:80
vtkgl::f
GLclampf f
Definition: vtkgl.h:14181
vtkCocoaRenderWindowInteractor::SetTimerDictionary
void SetTimerDictionary(void *dictionary)
vtkCocoaRenderWindowInteractor::Initialize
virtual void Initialize()
vtkCocoaRenderWindowInteractor::GetTimerDictionary
void * GetTimerDictionary()
vtkCocoaRenderWindowInteractor::SetClassExitMethod
static void SetClassExitMethod(void(*f)(void *), void *arg)
vtkCocoaRenderWindowInteractor::GetCocoaManager
void * GetCocoaManager()
vtkCocoaRenderWindowInteractor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent)
vtkRenderWindowInteractor.h
vtkCocoaRenderWindowInteractor::SetClassExitMethodArgDelete
static void SetClassExitMethodArgDelete(void(*f)(void *))
vtkgl::void
typedef void(APIENTRYP PFNGLBLENDCOLORPROC)(GLclampf red
vtkTDxConfigure.h
vtkCocoaRenderWindowInteractor::ExitCallback
virtual void ExitCallback()
vtkCocoaRenderWindowInteractor::vtkCocoaRenderWindowInteractor
vtkCocoaRenderWindowInteractor()