|
oveRTOS C++ API
C++20 RAII wrappers for the oveRTOS C API
|
C++ wrapper for LVGL's 2D data table widget. More...
#include <lvgl.hpp>


Public Member Functions | |
| Table (lv_obj_t *obj) | |
| Wraps an existing LVGL table object (non-owning). | |
| Table & | cell_value (uint32_t row, uint32_t col, const char *txt) |
| Sets a cell's text (LVGL copies the string). | |
| Table & | row_count (uint32_t n) |
| Sets the row count (grows/shrinks the table). | |
| Table & | column_count (uint32_t n) |
| Sets the column count. | |
| Table & | column_width (uint32_t col, int32_t w) |
| Sets the width of a specific column in pixels. | |
| const char * | get_cell_value (uint32_t row, uint32_t col) const |
Returns the text at (row, col). | |
| uint32_t | get_row_count () const |
| Returns the total row count. | |
| uint32_t | get_column_count () const |
| Returns the total column count. | |
| int32_t | get_column_width (uint32_t col) const |
| Returns the width of a specific column in pixels. | |
Public Member Functions inherited from ove::lvgl::ObjectView | |
| 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. | |
| ObjectView | get_child (int32_t idx) const |
Returns an ObjectView wrapping the child at the given index. | |
| 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. | |
Public Member Functions inherited from ove::lvgl::ObjectMixin< Table > | |
| Table & | size (int32_t w, int32_t h) |
| Sets both width and height of the object. | |
| Table & | width (int32_t w) |
| Sets the width of the object. | |
| Table & | height (int32_t h) |
| Sets the height of the object. | |
| Table & | pos (int32_t x, int32_t y) |
| Sets the position of the object relative to its parent. | |
| Table & | center () |
| Centers the object within its parent. | |
| Table & | 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. | |
| Table & | hide () |
Hides the object by adding LV_OBJ_FLAG_HIDDEN. | |
| Table & | show () |
Shows the object by removing LV_OBJ_FLAG_HIDDEN. | |
| Table & | visible (bool v) |
| Conditionally shows or hides the object. | |
| Table & | add_flag (lv_obj_flag_t f) |
| Adds one or more object flags. | |
| Table & | remove_flag (lv_obj_flag_t f) |
| Removes one or more object flags. | |
| Table & | add_state (lv_state_t s) |
| Adds one or more object states. | |
| Table & | remove_state (lv_state_t s) |
| Removes one or more object states. | |
| Table & | user_data (void *data) |
| Stores an arbitrary user data pointer on the LVGL object. | |
| Table & | clickable (bool on) |
| Enables or disables click events on the object. | |
| Table & | grid_dsc (const int32_t *cols, const int32_t *rows) |
| Configures this object as a grid container. | |
| Table & | flex_flow (lv_flex_flow_t flow) |
| Configure this object as a flex container with the given flow. | |
| Table & | 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). | |
| Table & | flex_grow (uint8_t grow) |
| Set this child's flex grow factor (0 disables growing). | |
| Table & | layout (uint32_t kind) |
| Switch the object's layout engine (None / Flex / Grid). | |
| Table & | scroll_to_y (int32_t y, bool anim) |
Scroll the object so y is visible. anim enables animated scrolling. | |
| Table & | 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 |
| Table & | remove_style_all () |
| Table & | 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. | |
| Table & | add_style (Style &style, lv_style_selector_t selector) |
Applies a reusable Style to this object for the given selector. | |
Public Member Functions inherited from ove::lvgl::EventMixin< Table > | |
| Table & | on (lv_event_code_t code, F &&fn) |
| Registers a stateless callback for the given event code. | |
| Table & | on (lv_event_code_t code, T *instance) |
| Registers a member function pointer as an event callback — minimal-overhead trampoline. | |
| Table & | on_click (F &&fn) |
Registers a stateless click callback (shorthand for on(LV_EVENT_CLICKED, fn)). | |
| Table & | on_click (T *instance) |
| Registers a member function click callback. | |
| Table & | on_value_changed (F &&fn) |
Registers a stateless value-changed callback (shorthand for on(LV_EVENT_VALUE_CHANGED, fn)). | |
| Table & | on_value_changed (T *instance) |
| Registers a member function value-changed callback. | |
Public Member Functions inherited from ove::lvgl::StyleMixin< Table > | |
| Table & | bg_color (lv_color_t c) |
| Sets the background color of the object. | |
| Table & | bg_color (lv_color_t c, lv_style_selector_t part) |
Sets the background color of a specific part (e.g. LV_PART_INDICATOR, LV_PART_KNOB, LV_PART_SCROLLBAR). | |
| Table & | bg_opa (lv_opa_t opa) |
| Sets the background opacity. | |
| Table & | bg_opa (lv_opa_t opa, lv_style_selector_t part) |
| Sets the background opacity on a specific part. | |
| Table & | border_color (lv_color_t c) |
| Sets the border color. | |
| Table & | border_color (lv_color_t c, lv_style_selector_t part) |
| Sets border color on a specific part. | |
| Table & | border_width (int32_t w) |
| Sets the border width in pixels. | |
| Table & | border_width (int32_t w, lv_style_selector_t part) |
| Sets the border width on a specific part. | |
| Table & | radius (int32_t r) |
| Sets the corner radius. | |
| Table & | radius (int32_t r, lv_style_selector_t part) |
| Sets the corner radius on a specific part. | |
| Table & | pad_all (int32_t p) |
| Sets uniform padding on all four sides. | |
| Table & | pad_hor (int32_t p) |
| Sets horizontal (left + right) padding. | |
| Table & | pad_ver (int32_t p) |
| Sets vertical (top + bottom) padding. | |
| Table & | pad_gap (int32_t g) |
| Sets the gap between children in flex/grid layouts. | |
| Table & | text_color (lv_color_t c) |
| Sets the text color. | |
| Table & | text_color (lv_color_t c, lv_style_selector_t part) |
| Sets text color on a specific part. | |
| Table & | text_font (const lv_font_t *f) |
| Sets the font used to render text. | |
| Table & | pad_top (int32_t p) |
| Sets top padding in pixels. | |
| Table & | pad_bottom (int32_t p) |
| Sets bottom padding in pixels. | |
| Table & | pad_left (int32_t p) |
| Sets left padding in pixels. | |
| Table & | pad_right (int32_t p) |
| Sets right padding in pixels. | |
| Table & | pad_row (int32_t p) |
| Sets the row gap between children in flex/grid layouts. | |
| Table & | pad_column (int32_t p) |
| Sets the column gap between children in flex/grid layouts. | |
| Table & | text_align (uint32_t align, lv_style_selector_t part=LV_PART_MAIN) |
| Sets the horizontal text alignment on the given part. | |
| Table & | set_opa (lv_opa_t opa) |
Sets the overall object opacity (0–255, or LV_OPA_*). | |
| Table & | arc_color (lv_color_t c, lv_style_selector_t part) |
| Sets arc color on a specific part. | |
| Table & | arc_width (int32_t w, lv_style_selector_t part) |
| Sets arc stroke width on a specific part. | |
| Table & | arc_opa (lv_opa_t opa, lv_style_selector_t part) |
| Sets arc opacity on a specific part. | |
| Table & | arc_rounded (bool rounded, lv_style_selector_t part) |
| Enables/disables rounded arc end caps on a specific part. | |
| Table & | translate_y (int32_t v, lv_style_selector_t part=LV_PART_MAIN) |
| Sets a vertical translation (post-layout offset) on the given part. | |
| Table & | margin_top (int32_t v, lv_style_selector_t part=LV_PART_MAIN) |
| Sets top margin (outer spacing) on the given part. | |
| Table & | margin_bottom (int32_t v, lv_style_selector_t part=LV_PART_MAIN) |
| Sets bottom margin (outer spacing) on the given part. | |
| Table & | margin_left (int32_t v, lv_style_selector_t part=LV_PART_MAIN) |
| Sets left margin (outer spacing) on the given part. | |
| Table & | margin_right (int32_t v, lv_style_selector_t part=LV_PART_MAIN) |
| Sets right margin (outer spacing) on the given part. | |
| Table & | max_height (int32_t v, lv_style_selector_t part=LV_PART_MAIN) |
| Sets the maximum height (in pixels) on the given part. | |
| Table & | opa_layered (lv_opa_t opa, lv_style_selector_t part=LV_PART_MAIN) |
| Sets the layered opacity (applied after compositing) on the given part. | |
Static Public Member Functions | |
| static Table | create (ObjectView parent) |
Creates a new table as a child of parent. | |
Static Public Member Functions inherited from ove::lvgl::ObjectView | |
| static ObjectView | screen_active () |
Returns an ObjectView wrapping the currently active screen. | |
Additional Inherited Members | |
Protected Attributes inherited from ove::lvgl::ObjectView | |
| lv_obj_t * | obj_ |
| Raw pointer to the wrapped LVGL object. | |
C++ wrapper for LVGL's 2D data table widget.
Cells are addressed by (row, col) and store a text string copied into LVGL-owned memory. Use cell_value_fmt for printf-style updates.