Skip to content

Latest commit

 

History

History
49 lines (40 loc) · 2.04 KB

File metadata and controls

49 lines (40 loc) · 2.04 KB

Content

class DecisionSolver::Window

GLFW window wrapper

Constructors

Window(), Window(std::nullptr_t) - create window object, dont initialize window

Window(DecisionSolver::WindowData& windowData) - create windowObject, initialize with data from windowData

Window(int width, int height, std::string name="New Window", DecisionSolver::WindowState state=WindowState::Regular) - create window object, init windowData with data from constructor parameters and init window

Copy constructor and assignment operator is not allowed

Destructor

~Window() - call Destroy() method

Public members

No public members

Public static members

No public static members

Public methods

Type Name Description
void Init() Init window with stored data
void Init(DecisionSolver::WindowData&) Store data and call Init()
void Init(int, int, std::string, DecisionSolver::WindowState) Store data and call Init()
void SwitchMode(DecisionSolver::WindowState) Toggle fullscreen
GLFWwindow* GetWindow() Get glfw window pointer
void SetTitle(std::string) Save new name in the window data and change title
void SetSize(int, int) Save and set new window size
bool Alive() True if window shouldn't close
int GetKeyState(int) Return state of key. Key is GLFW_KEY_*, result is GLFW_PRESS or GLFW_RELEASE
bool Ready() True if window has been initialized

Static methods

Type Name Description
void PollEvents() Call glfwPollEvents()
void InitGLFW() Call glfwInit()
void TerminateGLFW() Call glfwTerminate()