HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Member Functions | Data Fields | Static Public Attributes | Friends
tt::theme Class Reference

Public Member Functions

 theme (theme const &) noexcept=delete
 
 theme (theme &&) noexcept=delete
 
themeoperator= (theme const &) noexcept=delete
 
themeoperator= (theme &&) noexcept=delete
 
 theme (URL const &url)
 Open and parse a theme file.
 
color fillColor (ssize_t nesting_level) const noexcept
 Get fill color of elements of widgets and child widgets.
 
color borderColor (ssize_t nesting_level) const noexcept
 Get border color of elements of widgets and child widgets.
 
color gray (ssize_t level) const noexcept
 Get grey scale color This color is reversed between light and dark themes.
 

Data Fields

float toolbarHeight
 
float toolbarDecorationButtonWidth
 The width of a close, minimize, maximize, system menu button.
 
float margin = 6.0f
 Distance between widgets and between widgets and the border of the container.
 
f32x4 margin2D = f32x4{margin, margin}
 
f32x4 margin2Dx2 = f32x4{margin * 2.0f, margin * 2.0f}
 
float scroll_bar_thickness = margin * 2.0f
 
float borderWidth = 1.0f
 The line-width of a border.
 
float roundingRadius = 5.0f
 The rounding radius of boxes with rounded corners.
 
float smallSize = 15.0f
 The size of small square widgets.
 
float height = 22.0f
 The height of the larger widgets like buttons, text-input and drop-down-lists.
 
float width = 50.0f
 The width of the larger widgets and smaller widgets with included labels.
 
float maxLabelWidth = 300.0f
 Max width of labels in widgets.
 
float small_icon_size = 10.0f
 Size of icons that represents the size of label's text.
 
float icon_size = 20.0f
 Size of icons extending from the ascender to descender of a label's text.
 
float large_icon_size = 30.0f
 Size of icons representing the length of am average word of a label's text.
 
std::string name
 
theme_mode mode
 
color blue
 
color green
 
color indigo
 
color orange
 
color pink
 
color purple
 
color red
 
color teal
 
color yellow
 
color foregroundColor
 
color accentColor
 
color textSelectColor
 
color cursorColor
 
color incompleteGlyphColor
 
text_style labelStyle
 
text_style smallLabelStyle
 
text_style warningLabelStyle
 
text_style errorLabelStyle
 
text_style helpLabelStyle
 
text_style placeholderLabelStyle
 
text_style linkLabelStyle
 

Static Public Attributes

static themeglobal
 
static constexpr OperatingSystem operatingSystem = OperatingSystem::Windows
 

Friends

std::string to_string (theme const &rhs) noexcept
 
std::ostreamoperator<< (std::ostream &lhs, theme const &rhs)
 

Constructor & Destructor Documentation

◆ theme()

tt::theme::theme ( URL const & url)

Open and parse a theme file.

Member Function Documentation

◆ borderColor()

color tt::theme::borderColor ( ssize_t nesting_level) const
inlinenoexcept

Get border color of elements of widgets and child widgets.

Parameters
nestingLevelThe nesting level.

◆ fillColor()

color tt::theme::fillColor ( ssize_t nesting_level) const
inlinenoexcept

Get fill color of elements of widgets and child widgets.

Parameters
nestingLevelThe nesting level.

◆ gray()

color tt::theme::gray ( ssize_t level) const
inlinenoexcept

Get grey scale color This color is reversed between light and dark themes.

Parameters
levelGray level: 0 is background, positive values increase in foregroundness. -1 is foreground, more negative values go toward background.

Field Documentation

◆ borderWidth

float tt::theme::borderWidth = 1.0f

The line-width of a border.

◆ height

float tt::theme::height = 22.0f

The height of the larger widgets like buttons, text-input and drop-down-lists.

◆ icon_size

float tt::theme::icon_size = 20.0f

Size of icons extending from the ascender to descender of a label's text.

◆ large_icon_size

float tt::theme::large_icon_size = 30.0f

Size of icons representing the length of am average word of a label's text.

◆ margin

float tt::theme::margin = 6.0f

Distance between widgets and between widgets and the border of the container.

◆ maxLabelWidth

float tt::theme::maxLabelWidth = 300.0f

Max width of labels in widgets.

◆ roundingRadius

float tt::theme::roundingRadius = 5.0f

The rounding radius of boxes with rounded corners.

◆ small_icon_size

float tt::theme::small_icon_size = 10.0f

Size of icons that represents the size of label's text.

◆ smallSize

float tt::theme::smallSize = 15.0f

The size of small square widgets.

◆ toolbarDecorationButtonWidth

float tt::theme::toolbarDecorationButtonWidth
Initial value:
=
(operatingSystem == OperatingSystem::Windows) ? 30.0f : 20.0f

The width of a close, minimize, maximize, system menu button.

◆ toolbarHeight

float tt::theme::toolbarHeight
Initial value:
=
(operatingSystem == OperatingSystem::Windows) ? 30.0f : 20.0f

◆ width

float tt::theme::width = 50.0f

The width of the larger widgets and smaller widgets with included labels.


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