![]() |
Lysa UI
0.0
Lysa UI —UI components for the Lysa Engine
|
UI Widget drawing style base class.
Inheritance diagram for Style:Public Member Functions | |
| virtual | ~Style () = default |
| virtual void | addResource (Widget &widget, const std::string &resources) = 0 |
| virtual void | setOption (const std::string &name, const std::string &value) |
| std::string | getOption (const std::string &name) const |
| virtual void | draw (const Widget &widget, UIResource &resources, Vector2DRenderer &render, bool when) const = 0 |
| virtual void | resize (Widget &widget, Rect &rect, UIResource &resources) = 0 |
| const float4 & | getTextColor () const |
Static Public Member Functions | |
| static SystemTheme | getSystemTheme () |
| static std::shared_ptr< Style > | create (const std::string &name=DEFAULT_STYLE) |
Static Public Attributes | |
| static constexpr std::string | DEFAULT_STYLE {"material"} |
| Default UI style. More... | |
| static constexpr float | DEFAULT_SCROLL_BAR_SIZE {18.0f} |
| Default size of the scroll bars. More... | |
| static constexpr float | DEFAULT_RADIO_BUTTON_SIZE {16.0f} |
| Default size of the radio buttons. More... | |
| static constexpr float | DEFAULT_CHECK_BOX_SIZE {16.0f} |
| Default size of the check boxes. More... | |
| static constexpr float | DEFAULT_TREE_INDENT_SIZE {12.0f} |
| Default width of a tree view indentation level. More... | |
| static constexpr float | DEFAULT_SORT_ARROW_SIZE {8.0f} |
| Default width of a table sort direction indicator. More... | |
| static constexpr float | DEFAULT_KNOB_SIZE {48.0f} |
| Default size of the knobs. More... | |
| static const float4 | DEFAULT_SURFACE {0.060597f, 0.085516f, 0.149705f, 1.0f} |
| #3D4A63, background of the widgets More... | |
| static const float4 | DEFAULT_SURFACE_HIGH {0.075005f, 0.102416f, 0.180928f, 1.0f} |
| #45526E, background of the containers & of the raised widgets More... | |
| static const float4 | DEFAULT_SHADOW_DARK {0.033392f, 0.047861f, 0.085516f, 1.0f} |
| #2B364A, dark part of the relief More... | |
| static const float4 | DEFAULT_SHADOW_LIGHT {0.172811f, 0.233839f, 0.386691f, 1.0f} |
| #6B7DA1, bright part of the relief More... | |
| static const float4 | DEFAULT_CHECK_MARK {1.0f, 1.0f, 1.0f, 1.0f} |
| #FFFFFF, checkbox tick More... | |
| static const float4 | DEFAULT_CLOSE_MARK {1.0f, 1.0f, 1.0f, 1.0f} |
| #FFFFFF, close cross More... | |
| static const float4 | DEFAULT_BUTTON {0.108857f, 0.149705f, 0.263096f, 1.0f} |
| #546385, background of the buttons More... | |
| static const float4 | DEFAULT_OUTLINE {0.189224f, 0.253134f, 0.411965f, 1.0f} |
| #7082A6, outlines & separators More... | |
| static const float4 | DEFAULT_SELECTED {0.172811f, 0.253134f, 0.451520f, 1.0f} |
| #6B82AD, selected & pointed items More... | |
| static const float4 | DEFAULT_TREE_LINES {0.224503f, 0.294243f, 0.451520f, 1.0f} |
| #7A8CAD, branches of the tree views More... | |
| static const float4 | DEFAULT_TEXT {0.803252f, 0.859814f, 0.938506f, 1.0f} |
| #E6EDF7, texts More... | |
| static const float4 | DEFAULT_ACCENT {0.478992f, 0.629753f, 0.918480f, 1.0f} |
| #B2CCF5, accented parts More... | |
| static const float4 | DEFAULT_ON_ACCENT {0.033392f, 0.047861f, 0.085516f, 1.0f} |
| #2B364A, drawn over the accent More... | |
Protected Member Functions | |
| virtual void | init () |
| virtual void | updateOptions () |
| virtual void | updateColorOptions () |
| void | updateSizeOptions () |
| float4 | extractColor (const std::string &option, float r, float g, float b, float a=1.0f) const |
| float4 | extractColor (const std::string &option, const float4 &defaultColor) const |
| float | extractSize (const std::string &option, float defaultSize) const |
Static Protected Member Functions | |
| static float | squareWidth (const Widget &widget, float size) |
Protected Attributes | |
| float4 | focus {} |
| float4 | selected {} |
| float4 | highlight {} |
| float4 | cursor {} |
| float4 | shadowDark {} |
| float4 | shadowBright {} |
| float4 | fgUp {} |
| float4 | fgDown {} |
| float4 | checkMarkColor {} |
| float4 | button {} |
| float4 | treeLines {} |
| float4 | gridLines {} |
| float4 | textColor {1.0f, 1.0f, 1.0f, 1.0f} |
| float | scrollBarSize {DEFAULT_SCROLL_BAR_SIZE} |
| float | radioButtonSize {DEFAULT_RADIO_BUTTON_SIZE} |
| float | checkBoxSize {DEFAULT_CHECK_BOX_SIZE} |
| float | treeIndentSize {DEFAULT_TREE_INDENT_SIZE} |
| float | sortArrowSize {DEFAULT_SORT_ARROW_SIZE} |
| float | knobSize {DEFAULT_KNOB_SIZE} |
|
virtualdefault |
|
pure virtual |
Create a resource from a resources description string.
| widget | Widget to associate resources with. |
| resources | String describing the resources. |
Implemented in lysa::ui::StyleBase::addResource()
|
static |
Creates one of the built-in styles.
|
pure virtual |
Draws a widget.
| widget | Widget to draw. |
| resources | Resources used for drawing this widget. |
| render | The 2D renderer. |
| when | True = before drawing children, False = after. |
Implemented in lysa::ui::StyleBase::draw()
|
protected |
|
protected |
|
protected |
| std::string getOption | ( | const std::string & | name | ) | const |
Returns a style-specific option value.
|
static |
|
inline |
Returns the default color of the texts.
|
inlineprotectedvirtual |
|
pure virtual |
Adjusts a widget size to style specific constraints.
| widget | The widget being resized. |
| rect | The rectangle to adjust. |
| resources | The widget's UI resources. |
Implemented in lysa::ui::StyleBase::resize()
|
virtual |
Sets a style-specific option.
|
staticprotected |
|
protectedvirtual |
Reimplemented in lysa::ui::StyleMaterial::updateColorOptions()
|
protectedvirtual |
Reimplemented in lysa::ui::StyleMaterial::updateOptions()
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
inlinestatic |
#B2CCF5, accented parts
|
inlinestatic |
#546385, background of the buttons
|
staticconstexpr |
Default size of the check boxes.
|
inlinestatic |
#FFFFFF, checkbox tick
|
inlinestatic |
#FFFFFF, close cross
|
staticconstexpr |
Default size of the knobs.
|
inlinestatic |
#2B364A, drawn over the accent
|
inlinestatic |
#7082A6, outlines & separators
|
staticconstexpr |
Default size of the radio buttons.
|
staticconstexpr |
Default size of the scroll bars.
|
inlinestatic |
#6B82AD, selected & pointed items
|
inlinestatic |
#2B364A, dark part of the relief
|
inlinestatic |
#6B7DA1, bright part of the relief
|
staticconstexpr |
Default width of a table sort direction indicator.
|
staticconstexpr |
Default UI style.
|
inlinestatic |
#3D4A63, background of the widgets
Default palette shared by the built-in styles
|
inlinestatic |
#45526E, background of the containers & of the raised widgets
|
inlinestatic |
#E6EDF7, texts
|
staticconstexpr |
Default width of a tree view indentation level.
|
inlinestatic |
#7A8CAD, branches of the tree views
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |