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=========================================================================*/
22#ifndef vtkSDL2RenderWindowInteractor_h
23#define vtkSDL2RenderWindowInteractor_h
24
26#include "vtkRenderingUIModule.h" // For export macro
27#include <map> // for ivar
28
29class VTKRENDERINGUI_EXPORT vtkSDL2RenderWindowInteractor : public vtkRenderWindowInteractor
30{
31public:
36
38 void PrintSelf(ostream& os, vtkIndent indent) override;
39
43 virtual void Initialize() override;
44
50 void ProcessEvents() override;
51
57 void TerminateApp(void) override;
58
63 void ExitCallback() override;
64
65 // When using emscripten this adds the event hander
66 // and then returns without blocking or aborting.
67 // TerminateApp will remove the event hanbdler.
69
70protected:
73
74 bool ProcessEvent(void* event);
75
77
81 int InternalCreateTimer(int timerId, int timerType, unsigned long duration) override;
82 int InternalDestroyTimer(int platformTimerId) override;
84
85 std::map<int, int> VTKToPlatformTimerMap;
86
92 void StartEventLoop() override;
93
95
96private:
98 void operator=(const vtkSDL2RenderWindowInteractor&) = delete;
99};
100
101#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