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 =========================================================================*/
29 #ifndef vtkIOSRenderWindowInteractor_h
30 #define vtkIOSRenderWindowInteractor_h
31 
32 #include "vtkRenderingOpenGL2Module.h" // For export macro
34 
35 class VTKRENDERINGOPENGL2_EXPORT vtkIOSRenderWindowInteractor : public vtkRenderWindowInteractor
36 {
37 public:
42 
44  void PrintSelf(ostream& os, vtkIndent indent);
45 
49  virtual void Initialize();
50 
52 
61  virtual void Enable();
62  virtual void Disable();
64 
70  void TerminateApp();
71 
73 
79  static void SetClassExitMethod(void (*f)(void *), void *arg);
80  static void SetClassExitMethodArgDelete(void (*f)(void *));
82 
87  virtual void ExitCallback();
88 
89 // int GetButtonDown();
90 // void SetButtonDown(int button);
91 
92 protected:
95 
100  void SetTimerDictionary(void *dictionary); // Really an NSMutableDictionary*
101  void *GetTimerDictionary();
102 
104 
109  static void (*ClassExitMethod)(void *);
110  static void (*ClassExitMethodArgDelete)(void *);
111  static void *ClassExitMethodArg;
113 
115 
119  virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration);
120  virtual int InternalDestroyTimer(int platformTimerId);
122 
128  virtual void StartEventLoop();
129 
131 
135  void SetIOSManager(void *manager);
136  void *GetIOSManager();
138 
139 private:
141  void operator=(const vtkIOSRenderWindowInteractor&) VTK_DELETE_FUNCTION;
142 
143  // Important: this class cannot contain Objective-C instance
144  // variables for 2 reasons:
145  // 1) C++ files include this header
146  // 2) because of garbage collection
147  // Instead, use the IOSManager dictionary to keep a collection
148  // of what would otherwise be Objective-C instance variables.
149  void *IOSManager; // Really an NSMutableDictionary*
150 
151 };
152 
153 #endif
virtual void Enable()
Enable/Disable interactions.
virtual int InternalDestroyTimer(int platformTimerId)
Internal methods for creating and destroying timers that must be implemented by subclasses.
void PrintSelf(ostream &os, vtkIndent indent)
Methods invoked by print to print information about the object including superclasses.
virtual int InternalCreateTimer(int timerId, int timerType, unsigned long duration)
Internal methods for creating and destroying timers that must be implemented by subclasses.
implements IOS specific functions required by vtkRenderWindowInteractor.
virtual void Initialize()
Prepare for handling events and set the Enabled flag to true.
static vtkRenderWindowInteractor * New()
platform-independent render window interaction including picking and frame rate control.
a simple class to control print indentation
Definition: vtkIndent.h:39
virtual void ExitCallback()
These methods correspond to the the Exit, User and Pick callbacks.
virtual void StartEventLoop()
Run the event loop (does not return until TerminateApp is called).
virtual void TerminateApp(void)
This function is called on 'q','e' keypress if exitmethod is not specified and should be overridden b...
static void * ClassExitMethodArg
Class variables so an exit method can be defined for this class (used to set different exit methods f...