|
| Derived & | size (int32_t w, int32_t h) |
| | Sets both width and height of the object.
|
| |
| Derived & | width (int32_t w) |
| | Sets the width of the object.
|
| |
| Derived & | height (int32_t h) |
| | Sets the height of the object.
|
| |
| Derived & | pos (int32_t x, int32_t y) |
| | Sets the position of the object relative to its parent.
|
| |
| Derived & | center () |
| | Centers the object within its parent.
|
| |
| Derived & | align (lv_align_t a, int32_t x_ofs=0, int32_t y_ofs=0) |
| | Aligns the object to an anchor with an optional offset.
|
| |
| Derived & | hide () |
| | Hides the object by adding LV_OBJ_FLAG_HIDDEN.
|
| |
| Derived & | show () |
| | Shows the object by removing LV_OBJ_FLAG_HIDDEN.
|
| |
| Derived & | visible (bool v) |
| | Conditionally shows or hides the object.
|
| |
| Derived & | add_flag (lv_obj_flag_t f) |
| | Adds one or more object flags.
|
| |
| Derived & | remove_flag (lv_obj_flag_t f) |
| | Removes one or more object flags.
|
| |
| Derived & | add_state (lv_state_t s) |
| | Adds one or more object states.
|
| |
| Derived & | remove_state (lv_state_t s) |
| | Removes one or more object states.
|
| |
| Derived & | user_data (void *data) |
| | Stores an arbitrary user data pointer on the LVGL object.
|
| |
| Derived & | clickable (bool on) |
| | Enables or disables click events on the object.
|
| |
| Derived & | grid_dsc (const int32_t *cols, const int32_t *rows) |
| | Configures this object as a grid container.
|
| |
|
Derived & | flex_flow (lv_flex_flow_t flow) |
| | Configure this object as a flex container with the given flow.
|
| |
|
Derived & | flex_align (lv_flex_align_t main, lv_flex_align_t cross, lv_flex_align_t track) |
| | Set flex alignment for main axis, cross axis (items), and cross axis (tracks).
|
| |
|
Derived & | flex_grow (uint8_t grow) |
| | Set this child's flex grow factor (0 disables growing).
|
| |
|
Derived & | layout (uint32_t kind) |
| | Switch the object's layout engine (None / Flex / Grid).
|
| |
|
Derived & | scroll_to_y (int32_t y, bool anim) |
| | Scroll the object so y is visible. anim enables animated scrolling.
|
| |
|
Derived & | update_layout () |
| | Force a layout recomputation (needed before get_content_width/get_scroll_bottom).
|
| |
| int32_t | get_content_width () const |
| |
| int32_t | get_scroll_bottom () const |
| |
| Derived & | remove_style_all () |
| |
| Derived & | grid_cell (lv_grid_align_t col_align, int32_t col_pos, int32_t col_span, lv_grid_align_t row_align, int32_t row_pos, int32_t row_span) |
| | Places this object into a cell of its parent grid.
|
| |
| Derived & | add_style (Style &style, lv_style_selector_t selector) |
| | Applies a reusable Style to this object for the given selector.
|
| |
template<typename Derived>
class ove::lvgl::ObjectMixin< Derived >
CRTP mixin that adds fluent layout and visibility setters to widget classes.
Derive from ObjectMixin<Derived> to gain a chainable API for the most common LVGL object properties (size, position, alignment, flags, state, user data, clickability). All methods return Derived & to support method chaining.
- Template Parameters
-
| Derived | The concrete widget class inheriting this mixin. Must expose a get() method returning lv_obj_t*. |