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
16#ifndef vtkSDL2RenderWindowInteractor_h
17#define vtkSDL2RenderWindowInteractor_h
18
20#include "vtkRenderingUIModule.h" // For export macro
21#include <map> // for ivar
22
23VTK_ABI_NAMESPACE_BEGIN
24class VTKRENDERINGUI_EXPORT vtkSDL2RenderWindowInteractor : public vtkRenderWindowInteractor
25{
26public:
31
33 void PrintSelf(ostream& os, vtkIndent indent) override;
34
38 void Initialize() override;
39
44 void ProcessEvents() override;
45
51 void TerminateApp() override;
52
57 void ExitCallback() override;
58
59 // When using emscripten this adds the event handler
60 // and then returns without blocking or aborting.
61 // TerminateApp will remove the event hanbdler.
63
64protected:
67
68 bool ProcessEvent(void* event);
69
71
75 int InternalCreateTimer(int timerId, int timerType, unsigned long duration) override;
76 int InternalDestroyTimer(int platformTimerId) override;
78
79 std::map<int, int> VTKToPlatformTimerMap;
80
86 void StartEventLoop() override;
87
89
90private:
92 void operator=(const vtkSDL2RenderWindowInteractor&) = delete;
93};
94
95VTK_ABI_NAMESPACE_END
96#endif
a simple class to control print indentation
Definition vtkIndent.h:29
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.
static vtkSDL2RenderWindowInteractor * New()
Construct object so that light follows camera motion.
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.