forked from trlsmax/imgui-vtk
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathvtkImGuiSDL2RenderWindowInteractor.h
45 lines (36 loc) · 1.36 KB
/
vtkImGuiSDL2RenderWindowInteractor.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
/* Copyright (C) 2020 Pablo Hernandez-Cerdan
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
/**
* @class vtkImGuiSDL2RenderWindowInteractor
* @brief implements SDL2 specific functions to render with Imgui
*
*/
#ifndef vtkImGuiSDL2RenderWindowInteractor_h
#define vtkImGuiSDL2RenderWindowInteractor_h
#include "vtkSDL2RenderWindowInteractor.h"
#include "vtkRenderingUIModule.h" // For export macro
#include "imgui.h"
class VTKRENDERINGUI_EXPORT vtkImGuiSDL2RenderWindowInteractor : public vtkSDL2RenderWindowInteractor
{
public:
/** Inherit constructors from base class */
using vtkSDL2RenderWindowInteractor::vtkSDL2RenderWindowInteractor;
/**
* Construct object so that light follows camera motion.
*/
static vtkImGuiSDL2RenderWindowInteractor* New();
vtkTypeMacro(vtkImGuiSDL2RenderWindowInteractor, vtkRenderWindowInteractor);
void PrintSelf(ostream& os, vtkIndent indent) override;
inline void SetImguiIO(ImGuiIO * io) {imguiIO = io;};
inline ImGuiIO * GetImguiIO() {return imguiIO;};
/**
* Same code than base class but public and not processing events when
* ImGui wants to capture mouse or keyboard.
*/
bool ProcessEvent(void* arg);
public:
ImGuiIO * imguiIO;
};
#endif