VTK: Rendering/UI/vtkIOSRenderWindowInteractor.h Source File

| VTK 9.3.1

vtkIOSRenderWindowInteractor.h
Go to the documentation of this file.
1 // SPDX-FileCopyrightText: Copyright (c) Ken Martin, Will Schroeder, Bill Lorensen
2 // SPDX-License-Identifier: BSD-3-Clause
17 #ifndef vtkIOSRenderWindowInteractor_h
18 #define vtkIOSRenderWindowInteractor_h
19
20 #include "vtkRenderWindowInteractor.h"
21 #include "vtkRenderingUIModule.h" // For export macro
22
23 VTK_ABI_NAMESPACE_BEGIN
24 class VTKRENDERINGUI_EXPORT vtkIOSRenderWindowInteractor : public vtkRenderWindowInteractor
25 {
26 public:
30 static vtkIOSRenderWindowInteractor* New();
31
32 vtkTypeMacro(vtkIOSRenderWindowInteractor, vtkRenderWindowInteractor);
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
38 void Initialize() override;
39
41
50 void Enable() override;
51 void Disable() override;
53
59 void TerminateApp() override;
60
62
68 static void SetClassExitMethod(void (*f)(void*), void* arg);
69 static void SetClassExitMethodArgDelete(void (*f)(void*));
71
76 void ExitCallback() override;
77
78 // int GetButtonDown();
79 // void SetButtonDown(int button);
80
81 protected:
82 vtkIOSRenderWindowInteractor();
83 ~vtkIOSRenderWindowInteractor() override;
84
89 void SetTimerDictionary(void* dictionary); // Really an NSMutableDictionary*
90 void* GetTimerDictionary();
91
93
98 static void (*ClassExitMethod)(void*);
99 static void (*ClassExitMethodArgDelete)(void*);
100 static void* ClassExitMethodArg;
102
104
108 int InternalCreateTimer(int timerId, int timerType, unsigned long duration) override;
109 int InternalDestroyTimer(int platformTimerId) override;
111
117 void StartEventLoop() override;
118
120
124 void SetIOSManager(void* manager);
125 void* GetIOSManager();
127
128 private:
129 vtkIOSRenderWindowInteractor(const vtkIOSRenderWindowInteractor&) = delete;
130 void operator=(const vtkIOSRenderWindowInteractor&) = delete;
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 VTK_ABI_NAMESPACE_END
142 #endif
vtkIOSRenderWindowInteractor
implements IOS specific functions required by vtkRenderWindowInteractor.
Definition: vtkIOSRenderWindowInteractor.h:25
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.
vtkIOSRenderWindowInteractor::Initialize
void Initialize() override
Initialize the even handler.
vtkIOSRenderWindowInteractor::GetIOSManager
void * GetIOSManager()
Accessors for the IOS manager (Really an NSMutableDictionary*).
vtkIOSRenderWindowInteractor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIOSRenderWindowInteractor::SetClassExitMethodArgDelete
static void SetClassExitMethodArgDelete(void(*f)(void *))
Methods to set the default exit method for the class.
vtkIOSRenderWindowInteractor::Enable
void Enable() override
Enable/Disable interactions.
vtkIOSRenderWindowInteractor::GetTimerDictionary
void * GetTimerDictionary()
vtkIOSRenderWindowInteractor::New
static vtkIOSRenderWindowInteractor * New()
Construct object so that light follows camera motion.
vtkIOSRenderWindowInteractor::ExitCallback
void ExitCallback() override
These methods correspond to the Exit, User and Pick callbacks.
vtkIOSRenderWindowInteractor::ClassExitMethodArg
static void * ClassExitMethodArg
Class variables so an exit method can be defined for this class (used to set different exit methods f...
Definition: vtkIOSRenderWindowInteractor.h:100
vtkIOSRenderWindowInteractor::InternalCreateTimer
int InternalCreateTimer(int timerId, int timerType, unsigned long duration) override
IOS-specific internal timer methods.
vtkIOSRenderWindowInteractor::SetTimerDictionary
void SetTimerDictionary(void *dictionary)
Accessors for the IOS member variables.
vtkIOSRenderWindowInteractor::Disable
void Disable() override
Enable/Disable interactions.
vtkIOSRenderWindowInteractor::~vtkIOSRenderWindowInteractor
~vtkIOSRenderWindowInteractor() override
vtkIOSRenderWindowInteractor::SetIOSManager
void SetIOSManager(void *manager)
Accessors for the IOS manager (Really an NSMutableDictionary*).
vtkIOSRenderWindowInteractor::InternalDestroyTimer
int InternalDestroyTimer(int platformTimerId) override
IOS-specific internal timer methods.
vtkIOSRenderWindowInteractor::TerminateApp
void TerminateApp() override
IOS specific application terminate, calls ClassExitMethod then calls PostQuitMessage(0) to terminate ...
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:38
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:82
vtkRenderWindowInteractor.h