lv_roller.h

API reference for lv_roller.h

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

Functions

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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to roller object
optionsconst char *a string with '<br/>
' separated options. E.g. "One\nTwo\nThree"
modelv_roller_mode_tLV_ROLLER_MODE_NORMAL or LV_ROLLER_MODE_INFINITE

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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a roller object
sel_optuint32_tindex of the selected option (0 ... number of option - 1);
animlv_anim_enable_tLV_ANIM_ON: set with animation; LV_ANIM_OFF set immediately

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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to roller object
sel_optconst char *pointer to the string you want to set as an option
animlv_anim_enable_tLV_ANIM_ON: set with animation; LV_ANIM_OFF set immediately

Returns: booltrue if set successfully and false if the given string does not exist as an option in the roller

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)
Parameters
NameTypeDescription
objlv_obj_t *pointer to a roller object
row_cntuint32_tnumber of desired visible rows

Enums

lv_roller_mode_t

Roller mode.

NameDescription
LV_ROLLER_MODE_NORMALNormal mode (roller ends at the end of the options).
LV_ROLLER_MODE_INFINITEInfinite mode (roller can be scrolled forever).
Used by 1 function
  • lv_roller_set_options — param mode

_lv_property_roller_id_t

NameValue
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

lv_roller_class

 
const lv_obj_class_t lv_roller_class

Dependencies

How is this guide?

Last updated on

On this page