lv_grid.h

Defines

LV_GRID_FR(x)

Can be used track size to make the track fill the free space.

Parameters:
  • x -- how much space to take proportionally to other FR tracks

Returns:

a special track size

LV_GRID_CONTENT
LV_GRID_TEMPLATE_LAST

Enums

enum lv_grid_align_t

Values:

enumerator LV_GRID_ALIGN_START
enumerator LV_GRID_ALIGN_CENTER
enumerator LV_GRID_ALIGN_END
enumerator LV_GRID_ALIGN_STRETCH
enumerator LV_GRID_ALIGN_SPACE_EVENLY
enumerator LV_GRID_ALIGN_SPACE_AROUND
enumerator LV_GRID_ALIGN_SPACE_BETWEEN

Functions

void lv_grid_init(void)
void lv_obj_set_grid_dsc_array(lv_obj_t *obj, const int32_t col_dsc[], const int32_t row_dsc[])
void lv_obj_set_grid_align(lv_obj_t *obj, lv_grid_align_t column_align, lv_grid_align_t row_align)
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)

Set the cell of an object. The object's parent needs to have grid layout, else nothing will happen

Parameters:
  • obj -- pointer to an object

  • column_align -- the vertical alignment in the cell. LV_GRID_START/END/CENTER/STRETCH

  • col_pos -- column ID

  • col_span -- number of columns to take (>= 1)

  • row_align -- the horizontal alignment in the cell. LV_GRID_START/END/CENTER/STRETCH

  • row_pos -- row ID

  • row_span -- number of rows to take (>= 1)

int32_t lv_grid_fr(uint8_t x)

Just a wrapper to LV_GRID_FR for bindings.