imgui-platform-kit 2.0.0
Cross-platform Dear ImGui application framework
Loading...
Searching...
No Matches
imgui_kit::WindowParameters Struct Reference

Geometry and title of the top-level platform window. More...

#include <user_interface_parameters.h>

Collaboration diagram for imgui_kit::WindowParameters:
[legend]

Public Member Functions

 WindowParameters (std::string title="default title", int width=-1, int height=-1, int startPosX=0, int startPosY=0)
 Constructs window parameters.
 
void save (const std::string &filename=defaultWindowParametersFilename) const
 Saves the window geometry to an INI file.
 
void load (const std::string &filename=defaultWindowParametersFilename)
 Loads the window geometry from an INI file previously written by save().
 

Public Attributes

std::string title
 Text shown in the window title bar.
 
int width
 Window width in pixels; non-positive values use the monitor resolution.
 
int height
 Window height in pixels; non-positive values use the monitor resolution.
 
int startPosX
 Initial horizontal position of the window, in pixels.
 
int startPosY
 Initial vertical position of the window, in pixels.
 

Detailed Description

Geometry and title of the top-level platform window.

A non-positive width or height (e.g. the default -1) is replaced with the resolution of the active monitor.

Constructor & Destructor Documentation

◆ WindowParameters()

imgui_kit::WindowParameters::WindowParameters ( std::string  title = "default title",
int  width = -1,
int  height = -1,
int  startPosX = 0,
int  startPosY = 0 
)

Constructs window parameters.

Parameters
titleWindow title.
widthWindow width in pixels; non-positive values use the monitor resolution.
heightWindow height in pixels; non-positive values use the monitor resolution.
startPosXInitial horizontal window position in pixels.
startPosYInitial vertical window position in pixels.

Member Function Documentation

◆ load()

void imgui_kit::WindowParameters::load ( const std::string &  filename = defaultWindowParametersFilename)

Loads the window geometry from an INI file previously written by save().

Parameters
filenamePath of the INI file to read.

◆ save()

void imgui_kit::WindowParameters::save ( const std::string &  filename = defaultWindowParametersFilename) const

Saves the window geometry to an INI file.

Parameters
filenamePath of the INI file to write.

Member Data Documentation

◆ height

int imgui_kit::WindowParameters::height

Window height in pixels; non-positive values use the monitor resolution.

◆ startPosX

int imgui_kit::WindowParameters::startPosX

Initial horizontal position of the window, in pixels.

◆ startPosY

int imgui_kit::WindowParameters::startPosY

Initial vertical position of the window, in pixels.

◆ title

std::string imgui_kit::WindowParameters::title

Text shown in the window title bar.

◆ width

int imgui_kit::WindowParameters::width

Window width in pixels; non-positive values use the monitor resolution.


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