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 =========================================================================*/
28 #ifndef __vtkCocoaRenderWindowInteractor_h
29 #define __vtkCocoaRenderWindowInteractor_h
30 
32 #include "vtkTDxConfigure.h" // defines VTK_USE_TDX
33 #ifdef VTK_USE_TDX
34 class vtkTDxMacDevice;
35 #endif
36 
38 {
39 public:
42 
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
47  virtual void Initialize();
48 
50 
57  virtual void Enable();
58  virtual void Disable();
60 
64  virtual void Start();
65 
67 
72  vtkSetMacro(InstallMessageProc,int);
73  vtkGetMacro(InstallMessageProc,int);
74  vtkBooleanMacro(InstallMessageProc,int);
76 
81  void TerminateApp();
82 
84 
88  static void SetClassExitMethod(void (*f)(void *), void *arg);
89  static void SetClassExitMethodArgDelete(void (*f)(void *));
91 
94  virtual void ExitCallback();
95 
96 // int GetButtonDown();
97 // void SetButtonDown(int button);
98 
99 protected:
102 
104 
106 
108  void SetTimerDictionary(void *dictionary); // Really an NSMutableDictionary*
109  void *GetTimerDictionary();
110  void SetCocoaServer(void *server); // Really a vtkCocoaServer*
111  void *GetCocoaServer();
113 
114  //BTX
116 
119  static void (*ClassExitMethod)(void *);
120  static void (*ClassExitMethodArgDelete)(void *);
121  static void *ClassExitMethodArg;
122  //ETX
124 
126 
128  virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
129  virtual int InternalDestroyTimer(int platformTimerId);
131 
133 
135  void SetCocoaManager(void *manager);
136  void *GetCocoaManager();
138 
139 #ifdef VTK_USE_TDX
140  vtkTDxMacDevice *Device;
141 #endif
142 
143 private:
145  void operator=(const vtkCocoaRenderWindowInteractor&); // Not implemented.
146 
147  // Important: this class cannot contain Objective-C instance
148  // variables for 2 reasons:
149  // 1) C++ files include this header
150  // 2) because of garbage collection
151  // Instead, use the CocoaManager dictionary to keep a collection
152  // of what would otherwise be Objective-C instance variables.
153  void *CocoaManager; // Really an NSMutableDictionary*
154 
155 };
156 
157 #endif
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)
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:37
virtual void ExitCallback()
#define VTK_RENDERING_EXPORT