|
TachyonUI 0.1.0
High-performance UI for building tools.
|
A parsed style sheet: named styles, custom properties and font faces. More...
#include <gui_core/style/gui_style_sheet.h>
Public Member Functions | |
| bool | HasErrors () const |
| True when parsing reported any error. | |
| const Style * | GetStyle (std::string_view name) const |
| The style of a class name (without the '.'); nullptr when not defined. | |
| const CustomProperty * | GetCustomProperty (std::string_view name) const |
| A custom property by name (with the leading "--"); nullptr when not defined. | |
Public Attributes | |
| std::unordered_map< std::string, Style > | styles |
| keyed by class name, without the '. | |
| std::unordered_map< std::string, ChildStyles > | childStyles |
| The classes with :first-child / :last-child / :only-child rules; register them with StyleManager::RegisterWithChildStyles. | |
| std::unordered_map< std::string, CustomProperty > | customProperties |
| keyed by name including the leading "--" | |
| std::vector< FontFace > | fontFaces |
| in source order | |
| Style | baseStyle |
| what * rules set; styles start from it | |
| std::vector< ParseError > | errors |
| in the order found | |
A parsed style sheet: named styles, custom properties and font faces.
Register a style with StyleManager::Register to use it.
|
inline |
True when parsing reported any error.
| const Style * tachyon::StyleSheet::GetStyle | ( | std::string_view | name | ) | const |
The style of a class name (without the '.'); nullptr when not defined.
| const CustomProperty * tachyon::StyleSheet::GetCustomProperty | ( | std::string_view | name | ) | const |
A custom property by name (with the leading "--"); nullptr when not defined.
| std::unordered_map<std::string, Style> tachyon::StyleSheet::styles |
keyed by class name, without the '.
'
| std::unordered_map<std::string, ChildStyles> tachyon::StyleSheet::childStyles |
The classes with :first-child / :last-child / :only-child rules; register them with StyleManager::RegisterWithChildStyles.
| std::unordered_map<std::string, CustomProperty> tachyon::StyleSheet::customProperties |
keyed by name including the leading "--"
| std::vector<FontFace> tachyon::StyleSheet::fontFaces |
in source order
| Style tachyon::StyleSheet::baseStyle |
what * rules set; styles start from it
| std::vector<ParseError> tachyon::StyleSheet::errors |
in the order found