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 
38 class VTKRENDERINGUI_EXPORT vtkSDL2RenderWindowInteractor : public vtkRenderWindowInteractor
39 {
40 public:
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 
79 protected:
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 
105 private:
107  void operator=(const vtkSDL2RenderWindowInteractor&) = delete;
108 };
109 
110 #endif
vtkSDL2RenderWindowInteractor::New
static vtkSDL2RenderWindowInteractor * New()
Construct object so that light follows camera motion.
vtkSDL2RenderWindowInteractor::AddEventHandler
void AddEventHandler()
vtkSDL2RenderWindowInteractor::StartedMessageLoop
bool StartedMessageLoop
Definition: vtkSDL2RenderWindowInteractor.h:103
vtkSDL2RenderWindowInteractor::VTKToPlatformTimerMap
std::map< int, int > VTKToPlatformTimerMap
Definition: vtkSDL2RenderWindowInteractor.h:94
vtkSDL2RenderWindowInteractor::ProcessEvent
bool ProcessEvent(void *event)
vtkSDL2RenderWindowInteractor::PrintSelf
void PrintSelf(ostream &os, vtkIndent indent) override
Methods invoked by print to print information about the object including superclasses.
vtkIndent
a simple class to control print indentation
Definition: vtkIndent.h:113
vtkSDL2RenderWindowInteractor::ProcessEvents
void ProcessEvents() override
Run the event loop and return.
vtkSDL2RenderWindowInteractor::ExitCallback
void ExitCallback() override
These methods correspond to the Exit, User and Pick callbacks.
vtkSDL2RenderWindowInteractor::~vtkSDL2RenderWindowInteractor
~vtkSDL2RenderWindowInteractor() override
vtkSDL2RenderWindowInteractor::InternalDestroyTimer
int InternalDestroyTimer(int platformTimerId) override
SDL2-specific internal timer methods.
vtkRenderWindowInteractor
platform-independent render window interaction including picking and frame rate control.
Definition: vtkRenderWindowInteractor.h:192
vtkSDL2RenderWindowInteractor::StartEventLoop
void StartEventLoop() override
This will start up the event loop and never return.
vtkRenderWindowInteractor.h
vtkSDL2RenderWindowInteractor::InternalCreateTimer
int InternalCreateTimer(int timerId, int timerType, unsigned long duration) override
SDL2-specific internal timer methods.
vtkSDL2RenderWindowInteractor
implements SDL2 specific functions required by vtkRenderWindowInteractor.
Definition: vtkSDL2RenderWindowInteractor.h:39
vtkSDL2RenderWindowInteractor::Initialize
virtual void Initialize() override
Initialize the event handler.
vtkSDL2RenderWindowInteractor::TerminateApp
void TerminateApp(void) override
SDL2 specific application terminate, calls ClassExitMethod then calls PostQuitMessage(0) to terminate...
vtkSDL2RenderWindowInteractor::vtkSDL2RenderWindowInteractor
vtkSDL2RenderWindowInteractor()