-
Notifications
You must be signed in to change notification settings - Fork 0
/
FrameworkWindow.h
66 lines (44 loc) · 2.32 KB
/
FrameworkWindow.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#pragma once
#include "CommonInterfaces/CommonWindowInterface.h"
class FrameworkWindow : public CommonWindowInterface
{
float m_backgroundColor[3] = { 1.f, 1.f, 1.f };
int m_windowSx = 0;
int m_windowSy = 0;
b3MouseMoveCallback m_mouseMoveCallback = nullptr;
b3MouseButtonCallback m_mouseButtonCallback = nullptr;
b3ResizeCallback m_resizeCallback = nullptr;
b3WheelCallback m_wheelCallback = nullptr;
b3KeyboardCallback m_keyboardCallback = nullptr;
b3RenderCallback m_renderCallback = nullptr;
public:
virtual ~FrameworkWindow() override final;
virtual void createDefaultWindow(int width, int height, const char * title) override final;
virtual void createWindow(const b3gWindowConstructionInfo & ci) override final;
virtual void closeWindow() override final;
virtual void runMainLoop() override final;
virtual float getTimeInSeconds() override final;
virtual bool requestedExit() const override final;
virtual void setRequestExit() override final;
virtual void startRendering() override final;
virtual void endRendering() override final;
virtual bool isModifierKeyPressed(int key) override final;
virtual void setMouseMoveCallback(b3MouseMoveCallback mouseCallback) override final;
virtual b3MouseMoveCallback getMouseMoveCallback() override final;
virtual void setMouseButtonCallback(b3MouseButtonCallback mouseCallback) override final;
virtual b3MouseButtonCallback getMouseButtonCallback() override final;
virtual void setResizeCallback(b3ResizeCallback resizeCallback) override final;
virtual b3ResizeCallback getResizeCallback() override final;
virtual void setWheelCallback(b3WheelCallback wheelCallback) override final;
virtual b3WheelCallback getWheelCallback() override final;
virtual void setKeyboardCallback(b3KeyboardCallback keyboardCallback) override final;
virtual b3KeyboardCallback getKeyboardCallback() override final;
virtual void setRenderCallback(b3RenderCallback renderCallback) override final;
virtual void setWindowTitle(const char* title) override final;
virtual float getRetinaScale() const override final;
virtual void setAllowRetina(bool allow) override final;
virtual int getWidth() const override final;
virtual int getHeight() const override final;
virtual int fileOpenDialog(char * fileName, int maxFileNameLength) override final;
void setBackgroundColor(float rgb[3]);
};