lv_grid.h
API reference for lv_grid.h
Summary
Functions
layouts/grid/lv_grid.h:63function
lv_obj_set_grid_dsc_array
void lv_obj_set_grid_dsc_array(lv_obj_t *obj, const int32_t col_dsc[], const int32_t row_dsc[])| Name | Type |
|---|---|
obj | lv_obj_t * |
col_dsc | const int32_t |
row_dsc | const int32_t |
layouts/grid/lv_grid.h:65function
lv_obj_set_grid_align
void lv_obj_set_grid_align(lv_obj_t *obj, lv_grid_align_t column_align, lv_grid_align_t row_align)| Name | Type |
|---|---|
obj | lv_obj_t * |
column_align | lv_grid_align_t |
row_align | lv_grid_align_t |
layouts/grid/lv_grid.h:77function
lv_obj_set_grid_cell
Set the cell of an object. The object's parent needs to have grid layout, else nothing will happen
void lv_obj_set_grid_cell(lv_obj_t *obj, lv_grid_align_t column_align, int32_t col_pos, int32_t col_span, lv_grid_align_t row_align, int32_t row_pos, int32_t row_span)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object |
column_align | lv_grid_align_t | the vertical alignment in the cell. LV_GRID_START/END/CENTER/STRETCH |
col_pos | int32_t | column ID |
col_span | int32_t | number of columns to take (>= 1) |
row_align | lv_grid_align_t | the horizontal alignment in the cell. LV_GRID_START/END/CENTER/STRETCH |
row_pos | int32_t | row ID |
row_span | int32_t | number of rows to take (>= 1) |
Enums
lv_grid_align_t
| Name |
|---|
LV_GRID_ALIGN_START |
LV_GRID_ALIGN_CENTER |
LV_GRID_ALIGN_END |
LV_GRID_ALIGN_STRETCH |
LV_GRID_ALIGN_SPACE_EVENLY |
LV_GRID_ALIGN_SPACE_AROUND |
LV_GRID_ALIGN_SPACE_BETWEEN |
Used by 12 functions
lv_obj_set_style_grid_column_align— paramvaluelv_obj_set_style_grid_row_align— paramvaluelv_obj_set_style_grid_cell_x_align— paramvaluelv_obj_set_style_grid_cell_y_align— paramvaluelv_obj_set_grid_align— paramcolumn_alignlv_obj_set_grid_align— paramrow_alignlv_obj_set_grid_cell— paramcolumn_alignlv_obj_set_grid_cell— paramrow_alignlv_style_set_grid_column_align— paramvaluelv_style_set_grid_row_align— paramvaluelv_style_set_grid_cell_x_align— paramvaluelv_style_set_grid_cell_y_align— paramvalue
Macros
LV_GRID_FR
#define LV_GRID_FR(x) \
(LV_COORD_MAX - 100 + x)Can be used track size to make the track fill the free space.
Parameters| Name | Description |
|---|---|
x | how much space to take proportionally to other FR tracks |
Returns: a special track size
LV_GRID_CONTENT
#define LV_GRID_CONTENT (LV_COORD_MAX - 101)LV_GRID_TEMPLATE_LAST
#define LV_GRID_TEMPLATE_LAST (LV_COORD_MAX)Dependencies
How is this guide?
Last updated on