24#elif defined(__linux__) || defined(__APPLE__)
25#include <GLFW/glfw3.h>
208 BackgroundImageParameters bgImgParameters ={}) ;
Definition colour_palette.h:11
Theme
Available colour themes.
Definition themes.h:34
ImageFitType
How a background image is scaled to the window.
Definition user_interface_parameters.h:158
@ KEEP_ASPECT_RATIO
Scale the image preserving its aspect ratio.
@ ZOOM_TO_FIT
Stretch the image to fill the window.
constexpr char defaultThemeParametersFilename[]
Default INI filename reserved for persisting theme parameters.
Definition user_interface_parameters.h:36
constexpr char defaultWindowParametersFilename[]
Default INI filename used by WindowParameters::save() and WindowParameters::load().
Definition user_interface_parameters.h:34
Background image drawn behind all windows.
Definition user_interface_parameters.h:167
int height
Native image height in pixels (set when the image is loaded).
Definition user_interface_parameters.h:171
int width
Native image width in pixels (set when the image is loaded).
Definition user_interface_parameters.h:170
std::string path
Path to the image file; empty means no background image.
Definition user_interface_parameters.h:168
ImageFitType fitType
How the image is scaled to the window.
Definition user_interface_parameters.h:169
BackgroundImageParameters(std::string path="", ImageFitType fitType=ImageFitType::KEEP_ASPECT_RATIO)
Constructs background image parameters.
Fonts to load at startup.
Definition user_interface_parameters.h:81
std::vector< std::pair< std::string, int > > pathsAndSizes
Font file paths and their pixel sizes.
Definition user_interface_parameters.h:82
FontParameters(std::string path="", int size=12)
Constructs parameters for a single font.
FontParameters(const std::vector< std::pair< std::string, int > > &pathsAndSizes)
Constructs parameters for multiple fonts.
Window icon settings.
Definition user_interface_parameters.h:142
int height
Icon height in pixels (0 keeps the file's native size).
Definition user_interface_parameters.h:145
IconParameters(std::string path="", int width=0, int height=0)
Constructs icon parameters.
int width
Icon width in pixels (0 keeps the file's native size).
Definition user_interface_parameters.h:144
std::string path
Path to the icon file (.ico on Windows, .png on Linux).
Definition user_interface_parameters.h:143
Visual style of the user interface (theme and window styling).
Definition user_interface_parameters.h:105
ImVec4 textColor
Default text colour.
Definition user_interface_parameters.h:111
Theme theme
Colour theme applied to the interface (see imgui_kit::Theme).
Definition user_interface_parameters.h:106
StyleParameters(Theme theme)
Constructs style parameters with the given theme.
StyleParameters()
Constructs style parameters with the default theme.
float windowRounding
Corner rounding radius of windows, in pixels.
Definition user_interface_parameters.h:109
float transparency
Overall window transparency (alpha), 0.0-1.0.
Definition user_interface_parameters.h:110
ImVec4 windowBgColor
Background colour of the main window.
Definition user_interface_parameters.h:107
ImVec2 windowPadding
Padding within windows, in pixels.
Definition user_interface_parameters.h:108
void apply() const
Applies the style to the current ImGui context.
StyleParameters(Theme theme, ImVec4 bgColor)
Constructs style parameters with the given theme and background colour.
Aggregates all configuration passed to imgui_kit::UserInterface.
Definition user_interface_parameters.h:189
BackgroundImageParameters backgroundImageParameters
Background image settings.
Definition user_interface_parameters.h:194
UserInterfaceParameters(WindowParameters windowParameters={}, FontParameters fontParameters={}, const StyleParameters &styleParameters={}, IconParameters iconParameters={}, BackgroundImageParameters bgImgParameters={})
Constructs the aggregated parameters.
StyleParameters styleParameters
Theme and window styling.
Definition user_interface_parameters.h:192
IconParameters iconParameters
Window icon settings.
Definition user_interface_parameters.h:193
WindowParameters windowParameters
Top-level window geometry and title.
Definition user_interface_parameters.h:190
void save(const std::string &filename=defaultWindowParametersFilename) const
Saves the window geometry to an INI file.
FontParameters fontParameters
Fonts to load at startup.
Definition user_interface_parameters.h:191
Geometry and title of the top-level platform window.
Definition user_interface_parameters.h:45
int width
Window width in pixels; non-positive values use the monitor resolution.
Definition user_interface_parameters.h:47
int startPosY
Initial vertical position of the window, in pixels.
Definition user_interface_parameters.h:50
void load(const std::string &filename=defaultWindowParametersFilename)
Loads the window geometry from an INI file previously written by save().
std::string title
Text shown in the window title bar.
Definition user_interface_parameters.h:46
int height
Window height in pixels; non-positive values use the monitor resolution.
Definition user_interface_parameters.h:48
int startPosX
Initial horizontal position of the window, in pixels.
Definition user_interface_parameters.h:49
void save(const std::string &filename=defaultWindowParametersFilename) const
Saves the window geometry to an INI file.
WindowParameters(std::string title="default title", int width=-1, int height=-1, int startPosX=0, int startPosY=0)
Constructs window parameters.
Colour themes for the user interface and a runtime theme selector.