|
|
| Style () |
| | Constructs and initialises an empty LVGL style.
|
| |
|
| ~Style () |
| | Destroys the style, releasing any resources held by LVGL.
|
| |
|
| Style (const Style &)=delete |
| |
|
Style & | operator= (const Style &)=delete |
| |
| | Style (Style &&other) noexcept |
| | Move constructor — transfers the style data and reinitialises the source.
|
| |
| Style & | operator= (Style &&other) noexcept |
| | Move-assignment operator — transfers the style data and reinitialises the source.
|
| |
| lv_style_t * | get () |
| | Returns a mutable pointer to the underlying lv_style_t.
|
| |
| const lv_style_t * | get () const |
| | Returns a const pointer to the underlying lv_style_t.
|
| |
| Style & | bg_color (lv_color_t c) |
| | Sets the background color.
|
| |
| Style & | bg_opa (lv_opa_t opa) |
| | Sets the background opacity.
|
| |
| Style & | radius (int32_t r) |
| | Sets the corner radius.
|
| |
| Style & | border_color (lv_color_t c) |
| | Sets the border color.
|
| |
| Style & | border_width (int32_t w) |
| | Sets the border width in pixels.
|
| |
| Style & | pad_all (int32_t p) |
| | Sets uniform padding on all four sides.
|
| |
| Style & | text_color (lv_color_t c) |
| | Sets the text color.
|
| |
| Style & | text_font (const lv_font_t *f) |
| | Sets the font used to render text.
|
| |
RAII wrapper around an lv_style_t object.
Initialises the LVGL style on construction and resets (frees) it on destruction. Provides a fluent, chainable API for the most common style properties. Once populated, a Style can be applied to one or more LVGL objects via lv_obj_add_style().
- Note
- Non-copyable; movable. On move, the source style is left in a freshly initialised (empty) state rather than null so that LVGL does not hold a dangling pointer.