lv_roller.h
Typedefs
-
typedef _lv_roller_mode_t lv_roller_mode_t
Enums
Functions
-
lv_obj_t *lv_roller_create(lv_obj_t *parent)
Create a roller object
- 参数:
parent -- pointer to an object, it will be the parent of the new roller.
- 返回:
pointer to the created roller
-
void lv_roller_set_options(lv_obj_t *obj, const char *options, lv_roller_mode_t mode)
Set the options on a roller
- 参数:
obj -- pointer to roller object
options --
a string with '
' separated options. E.g. "One\nTwo\nThree"
mode --
LV_ROLLER_MODE_NORMAL
orLV_ROLLER_MODE_INFINITE
-
void lv_roller_set_selected(lv_obj_t *obj, uint32_t sel_opt, lv_anim_enable_t anim)
Set the selected option
- 参数:
obj -- pointer to a roller object
sel_opt -- index of the selected option (0 ... number of option - 1);
anim -- LV_ANIM_ON: set with animation; LV_ANOM_OFF set immediately
-
void lv_roller_set_visible_row_count(lv_obj_t *obj, uint32_t row_cnt)
Set the height to show the given number of rows (options)
- 参数:
obj -- pointer to a roller object
row_cnt -- number of desired visible rows
-
uint32_t lv_roller_get_selected(const lv_obj_t *obj)
Get the index of the selected option
- 参数:
obj -- pointer to a roller object
- 返回:
index of the selected option (0 ... number of option - 1);
-
void lv_roller_get_selected_str(const lv_obj_t *obj, char *buf, uint32_t buf_size)
Get the current selected option as a string.
- 参数:
obj -- pointer to ddlist object
buf -- pointer to an array to store the string
buf_size -- size of
buf
in bytes. 0: to ignore it.
Variables
-
const lv_obj_class_t lv_roller_class
-
struct lv_roller_t