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.
 
vec fillColor (ssize_t nestingLevel) const noexcept
 Get fill color of elements of widgets and child widgets.
 
vec borderColor (ssize_t nestingLevel) const noexcept
 Get border color of elements of widgets and child widgets.
 
vec gray (ssize_t level) const noexcept
 Get grey scale color This color is reversed between light and dark themes.
 

Data Fields

std::string name
 
ThemeMode mode
 
vec blue
 
vec green
 
vec indigo
 
vec orange
 
vec pink
 
vec purple
 
vec red
 
vec teal
 
vec yellow
 
vec foregroundColor
 
vec accentColor
 
vec textSelectColor
 
vec cursorColor
 
vec incompleteGlyphColor
 
TextStyle labelStyle
 
TextStyle smallLabelStyle
 
TextStyle warningLabelStyle
 
TextStyle errorLabelStyle
 
TextStyle helpLabelStyle
 
TextStyle placeholderLabelStyle
 
TextStyle linkLabelStyle
 

Static Public Attributes

static constexpr OperatingSystem operatingSystem = OperatingSystem::Windows
 
static float toolbarHeight
 
static float toolbarDecorationButtonWidth
 The width of a close, minimize, maximize, system menu button.
 
static constexpr float margin = 6.0f
 Distance between widgets and between widgets and the border of the container.
 
static const vec margin2D = vec{margin, margin}
 
static constexpr float borderWidth = 1.0f
 The line-width of a border.
 
static constexpr float roundingRadius = 5.0f
 The rounding radius of boxes with rounded corners.
 
static constexpr float smallHeight = 15.0f
 The height of smaller widget like labels, toggles, checkboxes and radio buttons.
 
static constexpr float smallWidth = smallHeight * 2.0f
 The width of smaller widget like labels, toggles, checkboxes and radio buttons.
 
static constexpr float height = 22.0f
 The height of the larger widgets like buttons, text-input and drop-down-lists.
 
static constexpr float width = 50.0f
 The width of the larger widgets and smaller widgets with included labels.
 
static constexpr float maxLabelWidth = 300.0f
 Max width of labels in widgets.
 
static constexpr float iconSize = 10.0
 Size of icons in buttons, based on the original 1EM.
 

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()

vec tt::Theme::borderColor ( ssize_t nestingLevel) const
inlinenoexcept

Get border color of elements of widgets and child widgets.

Parameters
nestingLevelThe nesting level.

◆ fillColor()

vec tt::Theme::fillColor ( ssize_t nestingLevel) const
inlinenoexcept

Get fill color of elements of widgets and child widgets.

Parameters
nestingLevelThe nesting level.

◆ gray()

vec 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

constexpr float tt::Theme::borderWidth = 1.0f
staticconstexpr

The line-width of a border.

◆ height

constexpr float tt::Theme::height = 22.0f
staticconstexpr

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

◆ iconSize

constexpr float tt::Theme::iconSize = 10.0
staticconstexpr

Size of icons in buttons, based on the original 1EM.

◆ margin

constexpr float tt::Theme::margin = 6.0f
staticconstexpr

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

◆ maxLabelWidth

constexpr float tt::Theme::maxLabelWidth = 300.0f
staticconstexpr

Max width of labels in widgets.

◆ roundingRadius

constexpr float tt::Theme::roundingRadius = 5.0f
staticconstexpr

The rounding radius of boxes with rounded corners.

◆ smallHeight

constexpr float tt::Theme::smallHeight = 15.0f
staticconstexpr

The height of smaller widget like labels, toggles, checkboxes and radio buttons.

◆ smallWidth

constexpr float tt::Theme::smallWidth = smallHeight * 2.0f
staticconstexpr

The width of smaller widget like labels, toggles, checkboxes and radio buttons.

Small widgets which include labels should be right aligned to the smallWidth with a margin between the widget and the included label.

◆ toolbarDecorationButtonWidth

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

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

◆ toolbarHeight

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

◆ width

constexpr float tt::Theme::width = 50.0f
staticconstexpr

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


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