Class representing a window. More...
#include <Window.h>
Public Member Functions | |
| CORE_API | Window (const WindowProps &props) |
| Constructs a window with the given properties. | |
| CORE_API | ~Window () |
| Destructor for the window. | |
| u32 | GetWidth () const |
| Gets the width of the window. | |
| u32 | GetHeight () const |
| Gets the height of the window. | |
| const WindowProps & | GetProps () const |
| Retrieves the current window properties. | |
| WindowProps & | GetProps () |
| Retrieves a mutable reference to the window properties. | |
| CORE_API void | OnUpdate () |
| Updates the window state. | |
| CORE_API void | SpawnErrorMessageBox (const std::string &title, const std::string &message) |
| Spawn an Error Message box. | |
| CORE_API void | SetTitle (const std::string &title) |
| Sets the Title of the Window. | |
Static Public Member Functions | |
| static HWND | GetNativeWindow () |
| Gets the native window handle. | |
| static HINSTANCE | GetInstance () |
| Gets the native instance handle. | |
Public Attributes | |
| EventQueue | EventQueue |
Class representing a window.
This class provides an interface for creating and managing a window using GLFW. It includes methods for handling events, setting properties, and updating the window state. The class allows for flexible window management and integrates with the engine's event system.
| Raven::Window::Window | ( | const WindowProps & | props | ) |
Constructs a window with the given properties.
This constructor creates a window using GLFW, initializes it with the specified properties (such as title, size, VSync, etc.), and sets up the event callback function.
| props | The window properties to use for creating the window. |
| Raven::Window::~Window | ( | ) |
Destructor for the window.
This destructor cleans up resources associated with the window and shuts down GLFW.
|
inline |
Gets the height of the window.
This method returns the current height of the window in pixels.
|
inlinestatic |
Gets the native instance handle.
|
inlinestatic |
Gets the native window handle.
This method returns the native window handle, which can be passed to platform-specific APIs if necessary.
|
inline |
Retrieves a mutable reference to the window properties.
This allows direct modification of the window's runtime state. Useful for updating properties like the callback function at runtime.
|
inline |
Retrieves the current window properties.
This method returns a reference to the window's properties, which include the title, size (width and height), maximized state, and the event callback.
|
inline |
Gets the width of the window.
This method returns the current width of the window in pixels.
| void Raven::Window::OnUpdate | ( | ) |
Updates the window state.
This method should be called every frame to update the window's state, handle events, and refresh the window contents.
| void Raven::Window::SetTitle | ( | const std::string & | title | ) |
| void Raven::Window::SpawnErrorMessageBox | ( | const std::string & | title, |
| const std::string & | message ) |
Spawn an Error Message box.
| title | The title of the spawned window |
| message | The message put into the Window |
| EventQueue Raven::Window::EventQueue |