|
| | Box (lv_obj_t *obj) |
| | Constructs a Box wrapping an existing LVGL object.
|
| |
|
| ObjectView () |
| | Constructs a null ObjectView (no associated LVGL object).
|
| |
| | ObjectView (lv_obj_t *obj) |
| | Constructs an ObjectView wrapping the given lv_obj_t*.
|
| |
| lv_obj_t * | get () const |
| | Returns the raw lv_obj_t* pointer.
|
| |
| | operator lv_obj_t * () const |
| | Implicit conversion to lv_obj_t* for use with LVGL C APIs.
|
| |
| | operator bool () const |
| | Contextual bool conversion — true if the object pointer is non-null.
|
| |
| ObjectView | parent () const |
| | Returns an ObjectView wrapping the parent of this object.
|
| |
| uint32_t | child_count () const |
| | Returns the number of direct children of this object.
|
| |
| int32_t | get_width () const |
| | Returns the current rendered width of this object.
|
| |
| int32_t | get_height () const |
| | Returns the current rendered height of this object.
|
| |
| void | del () |
| | Deletes the LVGL object and all its children, then nulls the pointer.
|
| |
|
void | clean () |
| | Deletes all children of this object without deleting the object itself.
|
| |
| Box & | size (int32_t w, int32_t h) |
| | Sets both width and height of the object.
|
| |
| Box & | width (int32_t w) |
| | Sets the width of the object.
|
| |
| Box & | height (int32_t h) |
| | Sets the height of the object.
|
| |
| Box & | pos (int32_t x, int32_t y) |
| | Sets the position of the object relative to its parent.
|
| |
| Box & | center () |
| | Centers the object within its parent.
|
| |
| Box & | 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.
|
| |
| Box & | hide () |
| | Hides the object by adding LV_OBJ_FLAG_HIDDEN.
|
| |
| Box & | show () |
| | Shows the object by removing LV_OBJ_FLAG_HIDDEN.
|
| |
| Box & | visible (bool v) |
| | Conditionally shows or hides the object.
|
| |
| Box & | add_flag (lv_obj_flag_t f) |
| | Adds one or more object flags.
|
| |
| Box & | remove_flag (lv_obj_flag_t f) |
| | Removes one or more object flags.
|
| |
| Box & | add_state (lv_state_t s) |
| | Adds one or more object states.
|
| |
| Box & | remove_state (lv_state_t s) |
| | Removes one or more object states.
|
| |
| Box & | user_data (void *data) |
| | Stores an arbitrary user data pointer on the LVGL object.
|
| |
| Box & | clickable (bool on) |
| | Enables or disables click events on the object.
|
| |
| Box & | on (lv_event_code_t code, F &&fn) |
| | Registers a stateless callback for the given event code.
|
| |
| Box & | on (lv_event_code_t code, T *instance) |
| | Registers a member function pointer as an event callback — zero-cost trampoline.
|
| |
| Box & | on_click (F &&fn) |
| | Registers a stateless click callback (shorthand for on(LV_EVENT_CLICKED, fn)).
|
| |
| Box & | on_click (T *instance) |
| | Registers a member function click callback.
|
| |
| Box & | on_value_changed (F &&fn) |
| | Registers a stateless value-changed callback (shorthand for on(LV_EVENT_VALUE_CHANGED, fn)).
|
| |
| Box & | on_value_changed (T *instance) |
| | Registers a member function value-changed callback.
|
| |
| Box & | bg_color (lv_color_t c) |
| | Sets the background color of the object.
|
| |
| Box & | bg_opa (lv_opa_t opa) |
| | Sets the background opacity.
|
| |
| Box & | border_color (lv_color_t c) |
| | Sets the border color.
|
| |
| Box & | border_width (int32_t w) |
| | Sets the border width in pixels.
|
| |
| Box & | radius (int32_t r) |
| | Sets the corner radius.
|
| |
| Box & | pad_all (int32_t p) |
| | Sets uniform padding on all four sides.
|
| |
| Box & | pad_hor (int32_t p) |
| | Sets horizontal (left + right) padding.
|
| |
| Box & | pad_ver (int32_t p) |
| | Sets vertical (top + bottom) padding.
|
| |
| Box & | pad_gap (int32_t g) |
| | Sets the gap between children in flex/grid layouts.
|
| |
| Box & | text_color (lv_color_t c) |
| | Sets the text color.
|
| |
| Box & | text_font (const lv_font_t *f) |
| | Sets the font used to render text.
|
| |
C++ wrapper for a generic LVGL container object with scrolling disabled.
Box is a plain lv_obj_t container created with the scrollable flag cleared, making it behave as a simple layout box. It supports the full fluent API from ObjectMixin, EventMixin, and StyleMixin.
Use the vbox() and hbox() free functions for pre-configured vertical and horizontal flex containers.
- Note
- Does not own the underlying LVGL object. Use
del() to destroy it.