lv_msgbox.h

Functions

lv_obj_t *lv_msgbox_create(lv_obj_t *parent, const char *title, const char *txt, const char *btn_txts[], bool add_close_btn)

Create a message box object

Parameters:
  • parent -- pointer to parent or NULL to create a full screen modal message box

  • title -- the title of the message box

  • txt -- the text of the message box

  • btn_txts -- the buttons as an array of texts terminated by an "" element. E.g. {"btn1", "btn2", ""}

  • add_close_btn -- true: add a close button

Returns:

pointer to the message box object

lv_obj_t *lv_msgbox_get_title(lv_obj_t *obj)
lv_obj_t *lv_msgbox_get_close_button(lv_obj_t *obj)
lv_obj_t *lv_msgbox_get_text(lv_obj_t *obj)
lv_obj_t *lv_msgbox_get_content(lv_obj_t *obj)
lv_obj_t *lv_msgbox_get_buttons(lv_obj_t *obj)
uint32_t lv_msgbox_get_active_button(lv_obj_t *mbox)

Get the index of the selected button

Parameters:

mbox -- message box object

Returns:

index of the button (LV_BUTTONMATRIX_BUTTON_NONE: if unset)

const char *lv_msgbox_get_active_button_text(lv_obj_t *mbox)
void lv_msgbox_close(lv_obj_t *mbox)
void lv_msgbox_close_async(lv_obj_t *mbox)

Variables

const lv_obj_class_t lv_msgbox_class
const lv_obj_class_t lv_msgbox_content_class
const lv_obj_class_t lv_msgbox_backdrop_class
struct lv_msgbox_t

Public Members

lv_obj_t obj
lv_obj_t *title
lv_obj_t *close_btn
lv_obj_t *content
lv_obj_t *text
lv_obj_t *buttons