lv_list.h

Functions

lv_obj_t *lv_list_create(lv_obj_t *parent)

Create a list object

参数:

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

返回:

pointer to the created list

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

Add text to a list

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

  • txt -- text of the new label

返回:

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

参数:
  • 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

返回:

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

参数:
  • list -- pointer to a list

  • btn -- pointer to the button

返回:

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

参数:
  • list -- pointer to a list

  • btn -- pointer to the button

  • txt -- pointer to the text

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