VTK
vtkIOSRenderWindowInteractor.h
Go to the documentation of this file.
1 /*=========================================================================
2 
3  Program: Visualization Toolkit
4  Module: vtkIOSRenderWindowInteractor.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 vtkIOSRenderWindowInteractor_h
29 #define vtkIOSRenderWindowInteractor_h
30 
31 #include "vtkRenderingOpenGL2Module.h" // For export macro
33 
34 class VTKRENDERINGOPENGL2_EXPORT vtkIOSRenderWindowInteractor : public vtkRenderWindowInteractor
35 {
36 public:
39 
41  void PrintSelf(ostream& os, vtkIndent indent);
42 
44  virtual void Initialize();
45 
47 
54  virtual void Enable();
55  virtual void Disable();
57 
62  void TerminateApp();
63 
65 
69  static void SetClassExitMethod(void (*f)(void *), void *arg);
70  static void SetClassExitMethodArgDelete(void (*f)(void *));
72 
75  virtual void ExitCallback();
76 
78 
80  int GetContactIndex(void *ptr);
81  void ClearContactIndex(void *ptr);
83 
84 // int GetButtonDown();
85 // void SetButtonDown(int button);
86 
87 protected:
90 
92 
94  void SetTimerDictionary(void *dictionary); // Really an NSMutableDictionary*
95  void *GetTimerDictionary();
97 
99 
102  static void (*ClassExitMethod)(void *);
103  static void (*ClassExitMethodArgDelete)(void *);
104  static void *ClassExitMethodArg;
106 
107  void *IDLookup[VTKI_MAX_POINTERS];
108 
110 
112  virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
113  virtual int InternalDestroyTimer(int platformTimerId);
115 
119  virtual void StartEventLoop();
120 
122 
124  void SetIOSManager(void *manager);
125  void *GetIOSManager();
127 
128 private:
130  void operator=(const vtkIOSRenderWindowInteractor&); // Not implemented.
131 
132  // Important: this class cannot contain Objective-C instance
133  // variables for 2 reasons:
134  // 1) C++ files include this header
135  // 2) because of garbage collection
136  // Instead, use the IOSManager dictionary to keep a collection
137  // of what would otherwise be Objective-C instance variables.
138  void *IOSManager; // Really an NSMutableDictionary*
139 
140 };
141 
142 #endif
virtual int InternalDestroyTimer(int platformTimerId)
void PrintSelf(ostream &os, vtkIndent indent)
virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration)
implements IOS specific functions required by vtkRenderWindowInteractor.
virtual void Initialize()
static vtkRenderWindowInteractor * New()
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 VTKI_MAX_POINTERS