Plasma Engine  2.0
Loading...
Searching...
No Matches
plWindowCreationDesc Struct Reference

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

#include <Window.h>

Public Member Functions

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

Public Attributes

plString m_Title = "plEngine"
 The window title to be displayed.
 
plEnum< plWindowModem_WindowMode
 Defines how the window size is determined.
 
plInt8 m_iMonitor = -1
 
plVec2I32 m_Position = plVec2I32(0x80000000, 0x80000000)
 The virtual position of the window. Determines on which monitor the window ends up.
 
plSizeU32 m_Resolution = plSizeU32(1280, 720)
 The pixel resolution of the window.
 
plUInt8 m_uiWindowNumber = 0
 
bool m_bClipMouseCursor = true
 
bool m_bShowMouseCursor = false
 
bool m_bSetForegroundOnInit = true
 Whether the window is activated and focussed 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()

plResult plWindowCreationDesc::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 plScreen::EnumerateScreens fails to enumerate the available screens.

Member Data Documentation

◆ m_bClipMouseCursor

bool plWindowCreationDesc::m_bClipMouseCursor = true

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

See also
plStandardInputDevice::SetClipMouseCursor

◆ m_bShowMouseCursor

bool plWindowCreationDesc::m_bShowMouseCursor = false

Whether the mouse cursor should be visible or not.

See also
plStandardInputDevice::SetShowMouseCursor

◆ m_iMonitor

plInt8 plWindowCreationDesc::m_iMonitor = -1

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

◆ m_uiWindowNumber

plUInt8 plWindowCreationDesc::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: