lv_msgbox.h

Functions

lv_obj_t *lv_msgbox_create(lv_obj_t *parent)

Create an empty message box

参数:

parent -- the parent of the message box

返回:

the created message box

lv_obj_t *lv_msgbox_add_title(lv_obj_t *obj, const char *title)

Add title to the message box. It also creates a header for the title.

参数:
  • obj -- pointer to a message box

  • title -- the text of the tile

返回:

the created title label

lv_obj_t *lv_msgbox_add_header_button(lv_obj_t *obj, const void *icon)

Add a button to the header of to the message box. It also creates a header.

参数:
  • obj -- pointer to a message box

  • icon -- the icon of the button

返回:

the created button

lv_obj_t *lv_msgbox_add_text(lv_obj_t *obj, const char *text)

Add a text to the content area of message box. Multiply texts will be created below each other.

参数:
  • obj -- pointer to a message box

  • icon -- the icon of the button

返回:

the created button

Add a button to the footer of to the message box. It also creates a footer.

参数:
  • obj -- pointer to a message box

  • text -- the text of the button

返回:

the created button

lv_obj_t *lv_msgbox_add_close_button(lv_obj_t *obj)

Add a close button to the message box. It also create a header.

参数:

obj -- pointer to a message box

返回:

the created close button

lv_obj_t *lv_msgbox_get_header(lv_obj_t *obj)

Get the header widget

参数:

obj -- pointer to a message box

返回:

the header, or NULL if not exists

lv_obj_t *lv_msgbox_get_footer(lv_obj_t *obj)

Get the footer widget

参数:

obj -- pointer to a message box

返回:

the footer, or NULL if not exists

lv_obj_t *lv_msgbox_get_content(lv_obj_t *obj)

Get the content widget

参数:

obj -- pointer to a message box

返回:

the content, or NULL if not exists

lv_obj_t *lv_msgbox_get_title(lv_obj_t *obj)

Get the title label

参数:

obj -- pointer to a message box

返回:

the title, or NULL if not exists

void lv_msgbox_close(lv_obj_t *mbox)

Close a message box

参数:

obj -- pointer to a message box

void lv_msgbox_close_async(lv_obj_t *mbox)

Close a message box in the next call of the message box

参数:

obj -- pointer to a message box

Variables

const lv_obj_class_t lv_msgbox_class
const lv_obj_class_t lv_msgbox_header_class
const lv_obj_class_t lv_msgbox_content_class
const lv_obj_class_t lv_msgbox_header_button_class
const lv_obj_class_t lv_msgbox_backdrop_class
struct lv_msgbox_t

Public Members

lv_obj_t obj
lv_obj_t *header
lv_obj_t *content
lv_obj_t *footer
lv_obj_t *title