lv_imagebutton.h
API reference for lv_imagebutton.h
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_imagebutton_private.h
Summary
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)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an image button object |
state | lv_imagebutton_state_t | for which state set the new image |
src_left | const void * | pointer to an image source for the left side of the button (a C array or path to a file) |
src_mid | const void * | pointer to an image source for the middle of the button (ideally 1px wide) (a C array or path to a file) |
src_right | const 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)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an image button object |
state | lv_imagebutton_state_t | for which state set the new image |
src_left | const 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)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an image button object |
state | lv_imagebutton_state_t | for which state set the new image |
src_right | const 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)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an image button object |
state | lv_imagebutton_state_t | for which state set the new image |
src_mid | const 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)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to an image button object |
state | lv_imagebutton_state_t | the 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— paramstatelv_imagebutton_set_src_left— paramstatelv_imagebutton_set_src_right— paramstatelv_imagebutton_set_src_mid— paramstatelv_imagebutton_set_state— paramstatelv_imagebutton_get_src_left— paramstatelv_imagebutton_get_src_middle— paramstatelv_imagebutton_get_src_right— paramstate
Variables
lv_imagebutton_class
const lv_obj_class_t lv_imagebutton_classDependencies
Indirect dependencies
lv_anim.hlv_area.hlv_array.hlv_assert.hlv_bidi.hlv_color.hlv_color_op.hlv_conf_internal.hlv_conf_kconfig.hlv_display.hlv_draw.hlv_draw_arc.hlv_draw_blur.hlv_draw_buf.hlv_draw_image.hlv_draw_label.hlv_draw_line.hlv_draw_rect.hlv_draw_triangle.hlv_event.hlv_ext_data.hlv_flex.hlv_font.hlv_fs.hlv_grad.hlv_grid.hlv_group.hlv_image_decoder.hlv_image_dsc.hlv_indev.hlv_layout.hlv_ll.hlv_log.hlv_math.hlv_matrix.hlv_mem.hlv_obj_class.hlv_obj_draw.hlv_obj_event.hlv_obj_pos.hlv_obj_property.hlv_obj_property_names.hlv_obj_scroll.hlv_obj_style.hlv_obj_style_gen.hlv_obj_tree.hlv_palette.hlv_profiler.hlv_profiler_builtin.hlv_sprintf.hlv_string.hlv_style.hlv_style_gen.hlv_style_properties.hlv_symbol_def.hlv_text.hlv_tick.hlv_timer.hlv_types.h
How is this guide?
Last updated on