lv_roller.h
API reference for lv_roller.h
See Also: Private HeaderThis header has a companion private implementation with internal data structures.lv_roller_private.h
Summary
Functions
widgets/roller/lv_roller.h:73function
lv_roller_set_options
Set the options on a roller
void lv_roller_set_options(lv_obj_t *obj, const char *options, lv_roller_mode_t mode)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to roller object |
options | const char * | a string with '<br/> ' separated options. E.g. "One\nTwo\nThree" |
mode | lv_roller_mode_t | LV_ROLLER_MODE_NORMAL or LV_ROLLER_MODE_INFINITE |
widgets/roller/lv_roller.h:81function
lv_roller_set_selected
Set the selected option
void lv_roller_set_selected(lv_obj_t *obj, uint32_t sel_opt, lv_anim_enable_t anim)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a roller object |
sel_opt | uint32_t | index of the selected option (0 ... number of option - 1); |
anim | lv_anim_enable_t | LV_ANIM_ON: set with animation; LV_ANIM_OFF set immediately |
widgets/roller/lv_roller.h:90function
lv_roller_set_selected_str
Sets the given string as the selection on the roller. Does not alter the current selection on failure.
bool lv_roller_set_selected_str(lv_obj_t *obj, const char *sel_opt, lv_anim_enable_t anim)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to roller object |
sel_opt | const char * | pointer to the string you want to set as an option |
anim | lv_anim_enable_t | LV_ANIM_ON: set with animation; LV_ANIM_OFF set immediately |
Returns: bool — true if set successfully and false if the given string does not exist as an option in the roller
widgets/roller/lv_roller.h:97function
lv_roller_set_visible_row_count
Set the height to show the given number of rows (options)
void lv_roller_set_visible_row_count(lv_obj_t *obj, uint32_t row_cnt)| Name | Type | Description |
|---|---|---|
obj | lv_obj_t * | pointer to a roller object |
row_cnt | uint32_t | number of desired visible rows |
Enums
lv_roller_mode_t
Roller mode.
| Name | Description |
|---|---|
LV_ROLLER_MODE_NORMAL | Normal mode (roller ends at the end of the options). |
LV_ROLLER_MODE_INFINITE | Infinite mode (roller can be scrolled forever). |
Used by 1 function
lv_roller_set_options— parammode
_lv_property_roller_id_t
| Name | Value |
|---|---|
LV_PROPERTY_ROLLER_OPTIONS | (LV_PROPERTY_ROLLER_START + ((int) 0 )) | (( 7 ) << 28 ) | (( 1 ) << 24 ) |
LV_PROPERTY_ROLLER_SELECTED | (LV_PROPERTY_ROLLER_START + ((int) 1 )) | (( 1 ) << 28 ) | (( 1 ) << 24 ) |
LV_PROPERTY_ROLLER_VISIBLE_ROW_COUNT | (LV_PROPERTY_ROLLER_START + ((int) 2 )) | (( 1 ) << 28 ) |
LV_PROPERTY_ROLLER_END |
Variables
widgets/roller/lv_roller.h:50variable
lv_roller_class
const lv_obj_class_t lv_roller_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_observer.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