Nui Engine
A game engine framework
|
Class representing a window in the application. More...
#include <Window.h>
Classes | |
struct | Size |
Window size. More... | |
Public Types | |
enum class | Style { Windowed , WindowedFullscreen , Borderless , BorderlessFullscreen } |
Window styles. More... | |
using | WndCallback = std::function<LRESULT(NUI_WNDPROC_ARGS)> |
Public Member Functions | |
Window (Window::Style style, WStringView title, Window::Size size={ 1280, 720 }) | |
Create a new window. | |
virtual | ~Window () |
Destroy the window. | |
HWND | GetHWND () const |
Get the window handle. | |
HINSTANCE | GetHinstance () const |
Get the Hinstance of the window. | |
Size | GetClientSize () const |
Get the client size. | |
void | SetWindowTitle (WString title) |
Set the window title. | |
bool | Maximized () const |
Check if the window is maximized. | |
bool | Focused () const |
Check if the window has focus. | |
bool | WantsToClose () const |
Runs the window message pump and checks if the window wants to close. | |
void | AddCallback (U32 msg, WndCallback callback) |
Add a window message callback. | |
Class representing a window in the application.
|
strong |
Window styles.
|
explicit |
|
virtual |
Destroy the window.
void Nui::Window::AddCallback | ( | U32 | msg, |
WndCallback | callback ) |
Add a window message callback.
msg | Window message |
callback | Callback |
bool Nui::Window::Focused | ( | ) | const |
Check if the window has focus.
Window::Size Nui::Window::GetClientSize | ( | ) | const |
Get the client size.
HINSTANCE Nui::Window::GetHinstance | ( | ) | const |
Get the Hinstance of the window.
HWND Nui::Window::GetHWND | ( | ) | const |
Get the window handle.
bool Nui::Window::Maximized | ( | ) | const |
Check if the window is maximized.
void Nui::Window::SetWindowTitle | ( | WString | title | ) |
Set the window title.
title | Window title |
bool Nui::Window::WantsToClose | ( | ) | const |
Runs the window message pump and checks if the window wants to close.