2#include "Core/Common/CommonHeaders.h"
3#include "Core/Input/Input.h"
58#define NUI_WNDPROC_ARGS Nui::Window*, UINT, WPARAM, LPARAM
59#define NUI_WNDPROC_NAMED_ARGS Nui::Window* window, UINT uMsg, WPARAM wParam, LPARAM lParam
60 using WndCallback = std::function<LRESULT(NUI_WNDPROC_ARGS)>;
134 void AdjustMaximizedClientRect(RECT& rect);
149 LRESULT MessageRouter(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
158 static LRESULT WINAPI WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
167 LRESULT MessageHandler(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
174 LRESULT HitTest(POINT cursor);
185 HINSTANCE m_hInstance;
213 std::map<U32, WndCallback> m_callbacks;
Class representing a window in the application.
Definition Window.h:12
HWND GetHWND() const
Get the window handle.
Definition Window.cpp:94
Style
Window styles.
Definition Window.h:19
@ WindowedFullscreen
Create maximized resizeable window.
@ Borderless
Create a non-resizeable window without border.
@ Windowed
Create resizeable window.
@ BorderlessFullscreen
Create maximized non-resizeable window without border.
bool Focused() const
Check if the window has focus.
Definition Window.cpp:111
void AddCallback(U32 msg, WndCallback callback)
Add a window message callback.
Definition Window.cpp:133
Size GetClientSize() const
Get the client size.
Definition Window.cpp:231
Window(Window::Style style, WStringView title, Window::Size size={ 1280, 720 })
Create a new window.
Definition Window.cpp:77
bool WantsToClose() const
Runs the window message pump and checks if the window wants to close.
Definition Window.cpp:116
virtual ~Window()
Destroy the window.
Definition Window.cpp:88
HINSTANCE GetHinstance() const
Get the Hinstance of the window.
Definition Window.cpp:96
bool Maximized() const
Check if the window is maximized.
Definition Window.cpp:98
void SetWindowTitle(WString title)
Set the window title.
Definition Window.cpp:239
Window size.
Definition Window.h:46
I32 Y
Height.
Definition Window.h:55
I32 X
Width.
Definition Window.h:50