XII Release 0.1.0
Loading...
Searching...
No Matches
xiiWindowCreationDescription Struct Reference

Parameters for creating a window, such as position and resolution. More...

#include <Window.h>

Public Member Functions

xiiResult AdjustWindowSizeAndPosition ()
 Adjusts the position and size members, depending on the current value of m_WindowMode and m_iMonitor.
 
void SaveToDDL (xiiOpenDdlWriter &ref_writer)
 Serializes the configuration to DDL.
 
xiiResult SaveToDDL (xiiStringView sFile)
 Serializes the configuration to DDL.
 
void LoadFromDDL (const xiiOpenDdlReaderElement *pParentElement)
 Deserializes the configuration from DDL.
 
xiiResult LoadFromDDL (xiiStringView sFile)
 Deserializes the configuration from DDL.
 

Public Attributes

xiiString m_Title = "XII"
 The window title to be displayed.
 
xiiEnum< xiiWindowModem_WindowMode
 Defines how the window size is determined.
 
xiiInt8 m_iMonitor = -1
 
xiiVec2I32 m_Position = xiiVec2I32(0x80000000, 0x80000000)
 The virtual position of the window. Determines on which monitor the window ends up.
 
xiiSizeU32 m_Resolution = xiiSizeU32(1280U, 720U)
 The pixel resolution of the window.
 
xiiUInt8 m_uiWindowNumber = 0
 
bool m_bClipMouseCursor = true
 
bool m_bShowMouseCursor = false
 
bool m_bSetForegroundOnInit = true
 Whether the window is activated and focused on Initialize()
 
bool m_bCenterWindowOnDisplay = true
 Whether the window is centered on the display.
 

Detailed Description

Parameters for creating a window, such as position and resolution.

Member Function Documentation

◆ AdjustWindowSizeAndPosition()

xiiResult xiiWindowCreationDescription::AdjustWindowSizeAndPosition ( )

Adjusts the position and size members, depending on the current value of m_WindowMode and m_iMonitor.

For windowed mode, this does nothing. For fullscreen modes, the window position is taken from the given monitor. For borderless fullscreen mode, the window resolution is also taken from the given monitor.

This function can only fail if xiiScreen::EnumerateScreens fails to enumerate the available screens.

Member Data Documentation

◆ m_bClipMouseCursor

bool xiiWindowCreationDescription::m_bClipMouseCursor = true

Whether the mouse cursor should be trapped inside the window or not.

See also
xiiStandardInputDevice::SetClipMouseCursor

◆ m_bShowMouseCursor

bool xiiWindowCreationDescription::m_bShowMouseCursor = false

Whether the mouse cursor should be visible or not.

See also
xiiStandardInputDevice::SetShowMouseCursor

◆ m_iMonitor

xiiInt8 xiiWindowCreationDescription::m_iMonitor = -1

The monitor index is as given by xiiScreen::EnumerateScreens. -1 as the index means to pick the primary monitor.

◆ m_uiWindowNumber

xiiUInt8 xiiWindowCreationDescription::m_uiWindowNumber = 0

The number of the window. This is mostly used for setting up the input system, which then reports different mouse positions for each window.


The documentation for this struct was generated from the following files: