22#error "lv_slider: lv_bar is required. Enable it in lv_conf.h (LV_USE_BAR 1)"
37 LV_SLIDER_MODE_NORMAL = LV_BAR_MODE_NORMAL,
38 LV_SLIDER_MODE_SYMMETRICAL = LV_BAR_MODE_SYMMETRICAL,
39 LV_SLIDER_MODE_RANGE = LV_BAR_MODE_RANGE
41typedef uint8_t lv_slider_mode_t;
47 int32_t * value_to_set;
49 uint8_t left_knob_focus : 1;
59 LV_SLIDER_DRAW_PART_KNOB,
60 LV_SLIDER_DRAW_PART_KNOB_LEFT,
61} lv_slider_draw_part_type_t;
86 lv_bar_set_value(obj, value, anim);
97 lv_bar_set_start_value(obj, value, anim);
106static inline void lv_slider_set_range(
lv_obj_t * obj, int32_t min, int32_t max)
108 lv_bar_set_range(obj, min, max);
116static inline void lv_slider_set_mode(
lv_obj_t * obj, lv_slider_mode_t mode)
118 lv_bar_set_mode(obj, (lv_bar_mode_t)mode);
130static inline int32_t lv_slider_get_value(
const lv_obj_t * obj)
132 return lv_bar_get_value(obj);
140static inline int32_t lv_slider_get_left_value(
const lv_obj_t * obj)
142 return lv_bar_get_start_value(obj);
150static inline int32_t lv_slider_get_min_value(
const lv_obj_t * obj)
152 return lv_bar_get_min_value(obj);
160static inline int32_t lv_slider_get_max_value(
const lv_obj_t * obj)
162 return lv_bar_get_max_value(obj);
170bool lv_slider_is_dragged(
const lv_obj_t * obj);
177static inline lv_slider_mode_t lv_slider_get_mode(
lv_obj_t * slider)
179 lv_bar_mode_t mode = lv_bar_get_mode(slider);
180 if(mode == LV_BAR_MODE_SYMMETRICAL)
return LV_SLIDER_MODE_SYMMETRICAL;
181 else if(mode == LV_BAR_MODE_RANGE)
return LV_SLIDER_MODE_RANGE;
182 else return LV_SLIDER_MODE_NORMAL;
lv_anim_enable_t
Definition lv_anim.h:37
Definition lv_obj_class.h:49