matf-rg-engine 1.0.0
Base for project for the Computer Graphics course at Faculty of Mathematics, University of Belgrade
Loading...
Searching...
No Matches
Window.hpp
Go to the documentation of this file.
1
6#ifndef WINDOW_HPP
7#define WINDOW_HPP
8#include <string>
9
10struct GLFWwindow;
11
12namespace engine::platform {
16 class Window final {
17 friend class PlatformController;
18
19 public:
23 int height() const {
24 return m_height;
25 }
26
30 int width() const {
31 return m_width;
32 }
33
37 const std::string &title() const {
38 return m_title;
39 }
40
46 GLFWwindow *handle_() const {
47 return m_handle;
48 }
49
50 private:
51 GLFWwindow *m_handle{};
52 int m_width{};
53 int m_height{};
54 std::string m_title{};
55
56 Window() = default;
57
58 Window(GLFWwindow *handle, int width, int height, std::string title) : m_handle(handle)
59 , m_width(width)
61 , m_title(std::move(title)) {
62 }
63 };
64}
65#endif //WINDOW_HPP
Registers Platform events such as mouse movement, key press, window events...
Definition PlatformController.hpp:45
Holds window properties.
Definition Window.hpp:16
Window(GLFWwindow *handle, int width, int height, std::string title)
Definition Window.hpp:58
const std::string & title() const
Get the title of the window.
Definition Window.hpp:37
GLFWwindow * handle_() const
Get the window handle pointer. You are not supposed to use this value outside the engine namespace.
Definition Window.hpp:46
std::string m_title
Definition Window.hpp:54
int m_width
Definition Window.hpp:52
GLFWwindow * m_handle
Definition Window.hpp:51
int m_height
Definition Window.hpp:53
int height() const
Get the height of the window.
Definition Window.hpp:23
int width() const
Get the width of the window.
Definition Window.hpp:30
Definition Input.hpp:10