VTK  9.3.0
vtkSDL2RenderWindowInteractor.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
19 #ifndef vtkSDL2RenderWindowInteractor_h
20 #define vtkSDL2RenderWindowInteractor_h
21 
23 #include "vtkRenderingUIModule.h" // For export macro
24 #include <map> // for ivar
25 
26 VTK_ABI_NAMESPACE_BEGIN
27 class VTKRENDERINGUI_EXPORT vtkSDL2RenderWindowInteractor : public vtkRenderWindowInteractor
28 {
29 public:
34 
36  void PrintSelf(ostream& os, vtkIndent indent) override;
37 
41  void Initialize() override;
42 
47  void ProcessEvents() override;
48 
54  void TerminateApp() override;
55 
60  void ExitCallback() override;
61 
62  // When using emscripten this adds the event handler
63  // and then returns without blocking or aborting.
64  // TerminateApp will remove the event hanbdler.
66 
67 protected:
70 
71  bool ProcessEvent(void* event);
72 
74 
78  int InternalCreateTimer(int timerId, int timerType, unsigned long duration) override;
79  int InternalDestroyTimer(int platformTimerId) override;
81 
82  std::map<int, int> VTKToPlatformTimerMap;
83 
89  void StartEventLoop() override;
90 
92 
93 private:
95  void operator=(const vtkSDL2RenderWindowInteractor&) = delete;
96 };
97 
98 VTK_ABI_NAMESPACE_END
99 #endif
a simple class to control print indentation
Definition: vtkIndent.h:38
platform-independent render window interaction including picking and frame rate control.
implements SDL2 specific functions required by vtkRenderWindowInteractor.
void TerminateApp() override
SDL2 specific application terminate, calls ClassExitMethod then calls PostQuitMessage(0) to terminate...
void ExitCallback() override
These methods correspond to the Exit, User and Pick callbacks.
void StartEventLoop() override
This will start up the event loop and never return.
void ProcessEvents() override
Process all user-interaction, timer events and return.
bool ProcessEvent(void *event)
int InternalDestroyTimer(int platformTimerId) override
SDL2-specific internal timer methods.
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
int InternalCreateTimer(int timerId, int timerType, unsigned long duration) override
SDL2-specific internal timer methods.
~vtkSDL2RenderWindowInteractor() override
void Initialize() override
Initialize the event handler.
static vtkSDL2RenderWindowInteractor * New()
Construct object so that light follows camera motion.