HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
Public Types | Public Member Functions
theme_widget_values Class Reference

Public Types

enum class  widget_state : uin8_t
 

Public Member Functions

theme_widget_valuesset_selector (std::string const &selector) noexcept
 Set the widget's selector, so that the values can be looked up from the theme.
 
theme_widget_valuesset_pixel_density (pixel_density const &pixel_density) noexcept
 
theme_widget_valuesset_widget_state (widget_state const &state) noexcept
 

Member Function Documentation

◆ set_selector()

theme_widget_values & theme_widget_values::set_selector ( std::string const & selector)
inlinenoexcept

Set the widget's selector, so that the values can be looked up from the theme.

The selector syntax is designed so that it is easy to concatonate the selectors of the parent widget and to append an user-specified selector.

Each widget will have a default selector which starts with a '/' which is the separator for each widget. It is followed by the name of the widget and is then followed by a ' '.

The syntax for a selector is as follows:

selector: ( '/' widget-name ' ' attributes )+
attributes: ( '#' id )? ( '.' class-name )* ( key '=' value )*
value: length-value | color-value
length-value: number ( 'px' | 'pt' | 'pd' | 'in' )
color-value:
color-name |
'#' [0-9a-fA-F]{6,8} |
'rgb(' number ',' number ',' number ')' |
'rgba(' number ',' number '.' number ',' number ')'

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