lv_list.h

Functions

lv_obj_t *lv_list_create(lv_obj_t *parent)

Create a list object

Parameters:

parent -- pointer to an object, it will be the parent of the new list

Returns:

pointer to the created list

lv_obj_t *lv_list_add_text(lv_obj_t *list, const char *txt)

Add text to a list

Parameters:
  • list -- pointer to a list, it will be the parent of the new label

  • txt -- text of the new label

Returns:

pointer to the created label

lv_obj_t *lv_list_add_button(lv_obj_t *list, const void *icon, const char *txt)

Add button to a list

Parameters:
  • list -- pointer to a list, it will be the parent of the new button

  • icon -- icon for the button, when NULL it will have no icon

  • txt -- text of the new button, when NULL no text will be added

Returns:

pointer to the created button

const char *lv_list_get_button_text(lv_obj_t *list, lv_obj_t *btn)

Get text of a given list button

Parameters:
  • list -- pointer to a list

  • btn -- pointer to the button

Returns:

text of btn, if btn doesn't have text "" will be returned

void lv_list_set_button_text(lv_obj_t *list, lv_obj_t *btn, const char *txt)

Set text of a given list button

Parameters:
  • list -- pointer to a list

  • btn -- pointer to the button

  • txt -- pointer to the text

Returns:

text of btn, if btn doesn't have text "" will be returned

Variables

const lv_obj_class_t lv_list_class
const lv_obj_class_t lv_list_text_class
const lv_obj_class_t lv_list_button_class