UI Widget drawing style base class.
|
| static std::shared_ptr< Style > | create (const std::string &name="vector") |
| |
|
| std::shared_ptr< Font > | font |
| |
| virtual void addResource |
( |
Widget & |
widget, |
|
|
const std::string & |
resources |
|
) |
| |
|
pure virtual |
| static std::shared_ptr<Style> create |
( |
const std::string & |
name = "vector" | ) |
|
|
static |
Creates a new UI drawing style renderer.
- Parameters
-
| name | Style name (e.g., "vector"). |
- Returns
- Shared pointer to the created style.
| virtual void draw |
( |
const Widget & |
widget, |
|
|
UIResource & |
resources, |
|
|
Vector2DRenderer & |
render, |
|
|
bool |
when |
|
) |
| const |
|
pure virtual |
Draws a widget.
- Parameters
-
| 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::StyleClassic::draw()
| std::shared_ptr<Font> getFont |
( |
| ) |
const |
|
inline |
Returns the default font for the style.
| std::string getOption |
( |
const std::string & |
name | ) |
const |
Returns a style-specific option value.
- Parameters
-
- Returns
- The option value as a string.
Adjusts a widget size to style specific constraints.
- Parameters
-
| widget | The widget being resized. |
| rect | The rectangle to adjust. |
| resources | The widget's UI resources. |
Implemented in lysa::ui::StyleClassic::resize()
| virtual void setOption |
( |
const std::string & |
name, |
|
|
const std::string & |
value |
|
) |
| |
|
virtual |
Sets a style-specific option.
- Parameters
-
| name | Option name. |
| value | Option value. |
| virtual void updateOptions |
( |
| ) |
|
|
protectedpure virtual |
| std::shared_ptr<Font> font |
|
protected |