lv_slider.h
Enums
Functions
-
lv_obj_t *lv_slider_create(lv_obj_t *parent)
Create a slider object
- Parameters:
parent – pointer to an object, it will be the parent of the new slider.
- Returns:
pointer to the created slider
-
void lv_slider_set_value(lv_obj_t *obj, int32_t value, lv_anim_enable_t anim)
Set a new value on the slider
- Parameters:
obj – pointer to a slider object
value – the new value
anim – LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
-
void lv_slider_set_left_value(lv_obj_t *obj, int32_t value, lv_anim_enable_t anim)
Set a new value for the left knob of a slider
- Parameters:
obj – pointer to a slider object
value – new value
anim – LV_ANIM_ON: set the value with an animation; LV_ANIM_OFF: change the value immediately
-
void lv_slider_set_range(lv_obj_t *obj, int32_t min, int32_t max)
Set minimum and the maximum values of a bar
- Parameters:
obj – pointer to the slider object
min – minimum value
max – maximum value
-
void lv_slider_set_mode(lv_obj_t *obj, lv_slider_mode_t mode)
Set the mode of slider.
- Parameters:
obj – pointer to a slider object
mode – the mode of the slider. See ::lv_slider_mode_t
-
int32_t lv_slider_get_value(const lv_obj_t *obj)
Get the value of the main knob of a slider
- Parameters:
obj – pointer to a slider object
- Returns:
the value of the main knob of the slider
-
int32_t lv_slider_get_left_value(const lv_obj_t *obj)
Get the value of the left knob of a slider
- Parameters:
obj – pointer to a slider object
- Returns:
the value of the left knob of the slider
-
int32_t lv_slider_get_min_value(const lv_obj_t *obj)
Get the minimum value of a slider
- Parameters:
obj – pointer to a slider object
- Returns:
the minimum value of the slider
-
int32_t lv_slider_get_max_value(const lv_obj_t *obj)
Get the maximum value of a slider
- Parameters:
obj – pointer to a slider object
- Returns:
the maximum value of the slider
-
bool lv_slider_is_dragged(const lv_obj_t *obj)
Give the slider is being dragged or not
- Parameters:
obj – pointer to a slider object
- Returns:
true: drag in progress false: not dragged
-
lv_slider_mode_t lv_slider_get_mode(lv_obj_t *slider)
Get the mode of the slider.
- Parameters:
slider – pointer to a slider object
- Returns:
see ::lv_slider_mode_t
Variables
-
const lv_obj_class_t lv_slider_class