Class Window

Class Documentation

class Window

Handles window creation.

Public Functions

Window(int xOffset, int yOffset, int width, int height, const String &title, bool isEditor, bool fullScreen, const String &icon)
Window(const Window&)
Window &operator=(const Window&)
~Window()
void show()
std::optional<int> processMessages()
void swapBuffers()
void applyDefaultViewport()
void clipCursor(RECT clip)

Clips or blocks the cursor beyond the specified rectangle.

void resetClipCursor()

Reset cursor clips and allow free cursor movement.

void showCursor(bool enabled)
void clearMain(const Color &color)
void clearOffScreen(const Color &color)
Variant toggleFullscreen(const Event *event)
Variant getScreenState(const Event *event)
int getWidth() const
int getHeight() const
int getTitleBarHeight() const
HWND getWindowHandle()
void setWindowTitle(String title)
void setWindowSize(const Vector2 &newSize)

Protected Functions

Variant quitWindow(const Event *event)
Variant quitEditorWindow(const Event *event)
Variant windowResized(const Event *event)

Protected Attributes

int m_Width
int m_Height
bool m_IsEditorWindow
bool m_IsFullscreen
WNDCLASSEX m_WindowClass = {0}
LPCSTR m_ClassName
HINSTANCE m_AppInstance
HWND m_WindowHandle

Protected Static Functions

static LRESULT CALLBACK Window::WindowsProc(HWND windowHandler, UINT msg, WPARAM wParam, LPARAM lParam)

Wraps DefWindowProc function.