Struct WindowProps#

Nested Relationships#

Nested Types#

Struct Documentation#

struct WindowProps#

Struct containing all Window properties needed to create a new TRAP::Window.

Remark

Headless mode: This struct is not available in headless mode.

Public Functions

explicit WindowProps(std::string title = "TRAP™", u32 width = 1280u, u32 height = 720u, f64 refreshRate = 60.0, bool vsync = false, Window::DisplayMode displayMode = Window::DisplayMode::Windowed, AdvancedProps advanced = AdvancedProps{}, const TRAP::Monitor &monitor = TRAP::Monitor::GetPrimaryMonitor()) noexcept#

Constructor for basic window properties.

Parameters:
  • title – Title for the new window.

  • width – Width for the new window.

  • height – Height for the new window.

  • refreshRate – Refresh rate for the new window.

  • vsync – Whether to enable VSync for the new window or not.

  • displayMode – Display mode for the new window.

  • advancedOptional advanced properties to be used for the new window.

  • monitorMonitor to be used by the new window.

Public Members

std::string Title#
u32 Width#
u32 Height#
f64 RefreshRate#
bool VSync#
Window::DisplayMode DisplayMode#
TRAP::Monitor Monitor#
struct TRAP::WindowProps::AdvancedProps Advanced#
struct AdvancedProps#

More advanced(optional) window properties.

Public Functions

explicit constexpr AdvancedProps(bool resizable = true, bool maximized = false, bool visible = true, bool focused = true, bool focusOnShow = true, bool decorated = true, bool rawMouseInput = false, Window::CursorMode cursorMode = Window::CursorMode::Normal) noexcept#

Constructor for advanced(optional) window properties.

Parameters:
  • resizable – Whether the window should be resizable.

  • maximized – Whether the window should be maximized on creation.

  • visible – Whether the window should be visible or not.

  • focused – Whether the window should be focused or not.

  • focusOnShow – Whether the window should be focused when shown or not.

  • decorated – Whether the window should be decorated or not.

  • rawMouseInput – Whether the window should use raw mouse input or not.

  • cursorMode – Cursor mode to be used by the window.

Public Members

bool Resizable = true#
bool Maximized = false#
bool Visible = true#
bool Focused = true#
bool FocusOnShow = true#
bool Decorated = true#
bool RawMouseInput = false#
Window::CursorMode CursorMode = Window::CursorMode::Normal#