lv_imagebutton.h

API reference for lv_imagebutton.h

Report on GitHub
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_imagebutton_private.h

Functions

lv_imagebutton_set_src

Set images for a state of the image button

 
void lv_imagebutton_set_src(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_left, const void *src_mid, const void *src_right)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an image button object
statelv_imagebutton_state_tfor which state set the new image
src_leftconst void *pointer to an image source for the left side of the button (a C array or path to a file)
src_midconst void *pointer to an image source for the middle of the button (ideally 1px wide) (a C array or path to a file)
src_rightconst void *pointer to an image source for the right side of the button (a C array or path to a file)

lv_imagebutton_set_src_left

Set the left image for a state of the image button

 
void lv_imagebutton_set_src_left(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_left)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an image button object
statelv_imagebutton_state_tfor which state set the new image
src_leftconst void *pointer to an image source for the left side of the button (a C array or path to a file)

lv_imagebutton_set_src_right

Set the right image for a state of the image button

 
void lv_imagebutton_set_src_right(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_right)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an image button object
statelv_imagebutton_state_tfor which state set the new image
src_rightconst void *pointer to an image source for the right side of the button (a C array or path to a file)

lv_imagebutton_set_src_mid

Set the middle image for a state of the image button

 
void lv_imagebutton_set_src_mid(lv_obj_t *obj, lv_imagebutton_state_t state, const void *src_mid)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an image button object
statelv_imagebutton_state_tfor which state set the new image
src_midconst void *pointer to an image source for the middle of the button (a C array or path to a file)

lv_imagebutton_set_state

Use this function instead of lv_obj_add/remove_state to set a state manually

 
void lv_imagebutton_set_state(lv_obj_t *obj, lv_imagebutton_state_t state)
Parameters
NameTypeDescription
objlv_obj_t *pointer to an image button object
statelv_imagebutton_state_tthe new state

Enums

lv_imagebutton_state_t

Name
LV_IMAGEBUTTON_STATE_RELEASED
LV_IMAGEBUTTON_STATE_PRESSED
LV_IMAGEBUTTON_STATE_DISABLED
LV_IMAGEBUTTON_STATE_CHECKED_RELEASED
LV_IMAGEBUTTON_STATE_CHECKED_PRESSED
LV_IMAGEBUTTON_STATE_CHECKED_DISABLED
LV_IMAGEBUTTON_STATE_NUM
Used by 8 functions
  • lv_imagebutton_set_src — param state
  • lv_imagebutton_set_src_left — param state
  • lv_imagebutton_set_src_right — param state
  • lv_imagebutton_set_src_mid — param state
  • lv_imagebutton_set_state — param state
  • lv_imagebutton_get_src_left — param state
  • lv_imagebutton_get_src_middle — param state
  • lv_imagebutton_get_src_right — param state

Variables

lv_imagebutton_class

 
const lv_obj_class_t lv_imagebutton_class

Dependencies

How is this guide?

Last updated on

On this page