lv_flex.h
API reference for lv_flex.h
Summary
Functions
layouts/flex/lv_flex.h:73function
lv_obj_set_flex_flow
Set how the item should flow
void lv_obj_set_flex_flow(lv_obj_t *obj, lv_flex_flow_t flow)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object. The parent must have flex layout else nothing will happen. |
flow | lv_flex_flow_t | an element of lv_flex_flow_t. |
layouts/flex/lv_flex.h:82function
lv_obj_set_flex_align
Set how to place (where to align) the items and tracks
void lv_obj_set_flex_align(lv_obj_t *obj, lv_flex_align_t main_place, lv_flex_align_t cross_place, lv_flex_align_t track_cross_place)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object. The parent must have flex layout else nothing will happen. |
main_place | lv_flex_align_t | where to place the items on main axis (in their track). Any value of lv_flex_align_t. |
cross_place | lv_flex_align_t | where to place the item in their track on the cross axis. LV_FLEX_ALIGN_START/END/CENTER |
track_cross_place | lv_flex_align_t | where to place the tracks in the cross direction. Any value of lv_flex_align_t. |
layouts/flex/lv_flex.h:90function
lv_obj_set_flex_grow
Sets the width or height (on main axis) to grow the object in order fill the free space
void lv_obj_set_flex_grow(lv_obj_t *obj, uint8_t grow)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an object. The parent must have flex layout else nothing will happen. |
grow | uint8_t | a value to set how much free space to take proportionally to other growing items. |
Enums
lv_flex_align_t
| Name |
|---|
LV_FLEX_ALIGN_START |
LV_FLEX_ALIGN_END |
LV_FLEX_ALIGN_CENTER |
LV_FLEX_ALIGN_SPACE_EVENLY |
LV_FLEX_ALIGN_SPACE_AROUND |
LV_FLEX_ALIGN_SPACE_BETWEEN |
Used by 9 functions
lv_obj_set_style_flex_main_place— paramvaluelv_obj_set_style_flex_cross_place— paramvaluelv_obj_set_style_flex_track_place— paramvaluelv_obj_set_flex_align— parammain_placelv_obj_set_flex_align— paramcross_placelv_obj_set_flex_align— paramtrack_cross_placelv_style_set_flex_main_place— paramvaluelv_style_set_flex_cross_place— paramvaluelv_style_set_flex_track_place— paramvalue
lv_flex_flow_t
| Name | Value |
|---|---|
LV_FLEX_FLOW_ROW | 0x00 |
LV_FLEX_FLOW_COLUMN | (1 << 0) |
LV_FLEX_FLOW_ROW_WRAP | LV_FLEX_FLOW_ROW | (1 << 2) |
LV_FLEX_FLOW_ROW_REVERSE | LV_FLEX_FLOW_ROW | (1 << 3) |
LV_FLEX_FLOW_ROW_WRAP_REVERSE | LV_FLEX_FLOW_ROW | (1 << 2) | (1 << 3) |
LV_FLEX_FLOW_COLUMN_WRAP | LV_FLEX_FLOW_COLUMN | (1 << 2) |
LV_FLEX_FLOW_COLUMN_REVERSE | LV_FLEX_FLOW_COLUMN | (1 << 3) |
LV_FLEX_FLOW_COLUMN_WRAP_REVERSE | LV_FLEX_FLOW_COLUMN | (1 << 2) | (1 << 3) |
Used by 3 functions
lv_obj_set_style_flex_flow— paramvaluelv_obj_set_flex_flow— paramflowlv_style_set_flex_flow— paramvalue
Macros
LV_FLEX_COLUMN
#define LV_FLEX_COLUMN (1 << 0)LV_FLEX_WRAP
#define LV_FLEX_WRAP (1 << 2)LV_FLEX_REVERSE
#define LV_FLEX_REVERSE (1 << 3)Dependencies
How is this guide?
Last updated on