#include <Window.hpp>
|
| | Window (uint32_t width, uint32_t height, const std::string &title, GLFWmonitor *monitor=nullptr, GLFWwindow *share=nullptr) |
| void | Destroy () |
| | Destroy the window.
|
| bool | ShouldClose () const |
| | Check if the window should close.
|
| GLFWwindow * | GetGLFWWindow () const |
| | Get a pointer to the GLFW window.
|
| void | SetTitle (std::string_view title) |
| | Set the window title.
|
| glm::uvec2 | GetSize () const |
| | Get the window size.
|
| void | SetSize (int width, int height) |
| | Set the window size.
|
| void | ToggleFullscreen () |
| | Toggle fullscreen mode.
|
| glm::vec2 | GetMousePosition () |
| | Get the current mouse position.
|
| void | SetResizable (bool resizable) |
| void | MaskCursor () |
| | Hide the cursor and lock it to the window.
|
| void | ShowCursor () |
| | Show the cursor and unlock it from the window.
|
| bool | IsCursorMasked () const |
| | Check if the cursor is currently masked (hidden and locked).
|
◆ Window()
| Window::Resource::Window::Window |
( |
uint32_t | width, |
|
|
uint32_t | height, |
|
|
const std::string & | title, |
|
|
GLFWmonitor * | monitor = nullptr, |
|
|
GLFWwindow * | share = nullptr ) |
◆ Destroy()
| void Window::Resource::Window::Destroy |
( |
| ) |
|
◆ GetGLFWWindow()
| GLFWwindow * Window::Resource::Window::GetGLFWWindow |
( |
| ) |
const |
|
inline |
Get a pointer to the GLFW window.
- Returns
- The GLFW window.
◆ GetMousePosition()
| glm::vec2 Window::Resource::Window::GetMousePosition |
( |
| ) |
|
|
inline |
Get the current mouse position.
- Returns
- A pair containing the x and y coordinates of the mouse.
◆ GetSize()
| glm::uvec2 Window::Resource::Window::GetSize |
( |
| ) |
const |
Get the window size.
This function will update the window size from the GLFW window content area and return it.
- Returns
- A vector of integers to store the size of the window.
◆ IsCursorMasked()
| bool Window::Resource::Window::IsCursorMasked |
( |
| ) |
const |
|
inline |
Check if the cursor is currently masked (hidden and locked).
◆ MaskCursor()
| void Window::Resource::Window::MaskCursor |
( |
| ) |
|
|
inline |
Hide the cursor and lock it to the window.
◆ SetResizable()
| void Window::Resource::Window::SetResizable |
( |
bool | resizable | ) |
|
|
inline |
◆ SetSize()
| void Window::Resource::Window::SetSize |
( |
int | width, |
|
|
int | height ) |
Set the window size.
- Parameters
-
| width | The new width of the window. |
| height | The new height of the window. |
◆ SetTitle()
| void Window::Resource::Window::SetTitle |
( |
std::string_view | title | ) |
|
|
inline |
Set the window title.
- Parameters
-
| title | The new title of the window. |
◆ ShouldClose()
| bool Window::Resource::Window::ShouldClose |
( |
| ) |
const |
|
inline |
Check if the window should close.
- Returns
- True if the window should close, false otherwise.
◆ ShowCursor()
| void Window::Resource::Window::ShowCursor |
( |
| ) |
|
|
inline |
Show the cursor and unlock it from the window.
◆ ToggleFullscreen()
| void Window::Resource::Window::ToggleFullscreen |
( |
| ) |
|
◆ _isFullscreen
| bool Window::Resource::Window::_isFullscreen = false |
|
private |
◆ _monitor
| GLFWmonitor* Window::Resource::Window::_monitor |
|
private |
◆ _share
| GLFWwindow* Window::Resource::Window::_share |
|
private |
◆ _title
| std::string Window::Resource::Window::_title |
|
private |
◆ _window
| GLFWwindow* Window::Resource::Window::_window |
|
private |
◆ _windowedHeight
| int Window::Resource::Window::_windowedHeight = 0 |
|
private |
◆ _windowedWidth
| int Window::Resource::Window::_windowedWidth = 0 |
|
private |
◆ _windowedX
| int Window::Resource::Window::_windowedX = 0 |
|
private |
◆ _windowedY
| int Window::Resource::Window::_windowedY = 0 |
|
private |
The documentation for this class was generated from the following files: