VTK  9.1.0
vtkSDL2RenderWindowInteractor.h
Go to the documentation of this file.
1/*=========================================================================
2
3 Program: Visualization Toolkit
4 Module: vtkSDL2RenderWindowInteractor.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=========================================================================*/
31#ifndef vtkSDL2RenderWindowInteractor_h
32#define vtkSDL2RenderWindowInteractor_h
33
35#include "vtkRenderingUIModule.h" // For export macro
36#include <map> // for ivar
37
38class VTKRENDERINGUI_EXPORT vtkSDL2RenderWindowInteractor : public vtkRenderWindowInteractor
39{
40public:
45
47 void PrintSelf(ostream& os, vtkIndent indent) override;
48
52 virtual void Initialize() override;
53
59 void ProcessEvents() override;
60
66 void TerminateApp(void) override;
67
72 void ExitCallback() override;
73
74 // When using emscripten this adds the event hander
75 // and then returns without blocking or aborting.
76 // TerminateApp will remove the event hanbdler.
78
79protected:
82
83 bool ProcessEvent(void* event);
84
86
90 int InternalCreateTimer(int timerId, int timerType, unsigned long duration) override;
91 int InternalDestroyTimer(int platformTimerId) override;
93
94 std::map<int, int> VTKToPlatformTimerMap;
95
101 void StartEventLoop() override;
102
104
105private:
107 void operator=(const vtkSDL2RenderWindowInteractor&) = delete;
108};
109
110#endif
a simple class to control print indentation
Definition: vtkIndent.h:113
platform-independent render window interaction including picking and frame rate control.
implements SDL2 specific functions required by vtkRenderWindowInteractor.
void ExitCallback() override
These methods correspond to the Exit, User and Pick callbacks.
void TerminateApp(void) override
SDL2 specific application terminate, calls ClassExitMethod then calls PostQuitMessage(0) to terminate...
void StartEventLoop() override
This will start up the event loop and never return.
virtual void Initialize() override
Initialize the event handler.
static vtkSDL2RenderWindowInteractor * New()
Construct object so that light follows camera motion.
void ProcessEvents() override
Run the event loop 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