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) override;
45 
49  void Initialize() override;
50 
52 
61  void Enable() override;
62  void Disable() override;
64 
70  void TerminateApp() override;
71 
73 
79  static void SetClassExitMethod(void (*f)(void *), void *arg);
80  static void SetClassExitMethodArgDelete(void (*f)(void *));
82 
87  void ExitCallback() override;
88 
89 // int GetButtonDown();
90 // void SetButtonDown(int button);
91 
92 protected:
95 
100  void SetTimerDictionary(void *dictionary); // Really an NSMutableDictionary*
102 
104 
109  static void (*ClassExitMethod)(void *);
110  static void (*ClassExitMethodArgDelete)(void *);
111  static void *ClassExitMethodArg;
113 
115 
119  int InternalCreateTimer(int timerId, int timerType, unsigned long duration) override;
120  int InternalDestroyTimer(int platformTimerId) override;
122 
128  void StartEventLoop() override;
129 
131 
135  void SetIOSManager(void *manager);
136  void *GetIOSManager();
138 
139 private:
141  void operator=(const vtkIOSRenderWindowInteractor&) = delete;
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
vtkIOSRenderWindowInteractor::SetTimerDictionary
void SetTimerDictionary(void *dictionary)
Accessors for the IOS member variables.
vtkIOSRenderWindowInteractor::SetIOSManager
void SetIOSManager(void *manager)
Accessors for the IOS manager (Really an NSMutableDictionary*).
vtkIOSRenderWindowInteractor::SetClassExitMethodArgDelete
static void SetClassExitMethodArgDelete(void(*f)(void *))
vtkIOSRenderWindowInteractor::Enable
void Enable() override
Enable/Disable interactions.
vtkIOSRenderWindowInteractor::~vtkIOSRenderWindowInteractor
~vtkIOSRenderWindowInteractor() override
vtkIOSRenderWindowInteractor::ExitCallback
void ExitCallback() override
These methods correspond to the Exit, User and Pick callbacks.
vtkIOSRenderWindowInteractor::ClassExitMethodArg
static void * ClassExitMethodArg
Definition: vtkIOSRenderWindowInteractor.h:111
vtkIOSRenderWindowInteractor::SetClassExitMethod
static void SetClassExitMethod(void(*f)(void *), void *arg)
Methods to set the default exit method for the class.
vtkIOSRenderWindowInteractor::vtkIOSRenderWindowInteractor
vtkIOSRenderWindowInteractor()
vtkIOSRenderWindowInteractor::StartEventLoop
void StartEventLoop() override
This will start up the event loop and never return.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:40
vtkIOSRenderWindowInteractor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIOSRenderWindowInteractor::GetTimerDictionary
void * GetTimerDictionary()
vtkIOSRenderWindowInteractor::TerminateApp
void TerminateApp() override
IOS specific application terminate, calls ClassExitMethod then calls PostQuitMessage(0) to terminate ...
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:79
vtkIOSRenderWindowInteractor::Disable
void Disable() override
vtkIOSRenderWindowInteractor
implements IOS specific functions required by vtkRenderWindowInteractor.
Definition: vtkIOSRenderWindowInteractor.h:36
vtkIOSRenderWindowInteractor::Initialize
void Initialize() override
Initialize the even handler.
vtkIOSRenderWindowInteractor::GetIOSManager
void * GetIOSManager()
vtkIOSRenderWindowInteractor::InternalDestroyTimer
int InternalDestroyTimer(int platformTimerId) override
vtkRenderWindowInteractor.h
vtkIOSRenderWindowInteractor::InternalCreateTimer
int InternalCreateTimer(int timerId, int timerType, unsigned long duration) override
IOS-specific internal timer methods.
vtkIOSRenderWindowInteractor::New
static vtkIOSRenderWindowInteractor * New()
Construct object so that light follows camera motion.