lv_checkbox.h

Enums

enum lv_checkbox_draw_part_type_t

type field in lv_obj_draw_part_dsc_t if class_p = lv_checkbox_class Used in LV_EVENT_DRAW_PART_BEGIN and LV_EVENT_DRAW_PART_END

Values:

enumerator LV_CHECKBOX_DRAW_PART_BOX

The tick box

Functions

lv_obj_t *lv_checkbox_create(lv_obj_t *parent)

Create a check box object

Parameters:

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

Returns:

pointer to the created check box

void lv_checkbox_set_text(lv_obj_t *obj, const char *txt)

Set the text of a check box. txt will be copied and may be deallocated after this function returns.

Parameters:
  • obj -- pointer to a check box

  • txt -- the text of the check box. NULL to refresh with the current text.

void lv_checkbox_set_text_static(lv_obj_t *obj, const char *txt)

Set the text of a check box. txt must not be deallocated during the life of this checkbox.

Parameters:
  • obj -- pointer to a check box

  • txt -- the text of the check box.

const char *lv_checkbox_get_text(const lv_obj_t *obj)

Get the text of a check box

Parameters:

obj -- pointer to check box object

Returns:

pointer to the text of the check box

Variables

const lv_obj_class_t lv_checkbox_class
struct lv_checkbox_t

Public Members

lv_obj_t obj
char *txt
uint32_t static_txt