/lvgl-3.5.0/src/widgets/ |
D | lv_slider.c | 71 lv_slider_t * slider = (lv_slider_t *)obj; in lv_slider_is_dragged() local 73 return slider->dragging ? true : false; in lv_slider_is_dragged() 83 lv_slider_t * slider = (lv_slider_t *)obj; in lv_slider_constructor() local 86 slider->value_to_set = NULL; in lv_slider_constructor() 87 slider->dragging = 0U; in lv_slider_constructor() 88 slider->left_knob_focus = 0U; in lv_slider_constructor() 107 lv_slider_t * slider = (lv_slider_t *)obj; in lv_slider_event() local 117 lv_area_copy(&a, &slider->right_knob_area); in lv_slider_event() 123 lv_area_copy(&a, &slider->left_knob_area); in lv_slider_event() 132 slider->dragging = true; in lv_slider_event() [all …]
|
D | lv_slider.h | 177 static inline lv_slider_mode_t lv_slider_get_mode(lv_obj_t * slider) in lv_slider_get_mode() argument 179 lv_bar_mode_t mode = lv_bar_get_mode(slider); in lv_slider_get_mode()
|
/lvgl-3.5.0/examples/widgets/chart/ |
D | lv_example_chart_5.py | 47 slider = e.get_target() 48 v = slider.get_value() 53 slider = e.get_target() 54 v = slider.get_value() 78 slider = lv.slider(lv.scr_act()) variable 79 slider.set_range(lv.IMG_ZOOM.NONE, lv.IMG_ZOOM.NONE * 10) 80 slider.add_event_cb(slider_x_event_cb, lv.EVENT.VALUE_CHANGED, None) 81 slider.set_size(200,10) 82 slider.align_to(chart, lv.ALIGN.OUT_BOTTOM_MID, 0, 20) 84 slider = lv.slider(lv.scr_act()) variable [all …]
|
D | lv_example_chart_5.c | 85 lv_obj_t * slider; in lv_example_chart_5() local 86 slider = lv_slider_create(lv_scr_act()); in lv_example_chart_5() 87 lv_slider_set_range(slider, LV_IMG_ZOOM_NONE, LV_IMG_ZOOM_NONE * 10); in lv_example_chart_5() 88 lv_obj_add_event_cb(slider, slider_x_event_cb, LV_EVENT_VALUE_CHANGED, NULL); in lv_example_chart_5() 89 lv_obj_set_size(slider, 200, 10); in lv_example_chart_5() 90 lv_obj_align_to(slider, chart, LV_ALIGN_OUT_BOTTOM_MID, 0, 20); in lv_example_chart_5() 92 slider = lv_slider_create(lv_scr_act()); in lv_example_chart_5() 93 lv_slider_set_range(slider, LV_IMG_ZOOM_NONE, LV_IMG_ZOOM_NONE * 10); in lv_example_chart_5() 94 lv_obj_add_event_cb(slider, slider_y_event_cb, LV_EVENT_VALUE_CHANGED, NULL); in lv_example_chart_5() 95 lv_obj_set_size(slider, 10, 150); in lv_example_chart_5() [all …]
|
/lvgl-3.5.0/tests/src/test_cases/ |
D | test_slider.c | 8 static lv_obj_t * slider = NULL; variable 17 slider = lv_slider_create(active_screen); in setUp() 37 lv_coord_t objw = lv_obj_get_width(slider); in test_textarea_should_have_valid_documented_default_values() 38 lv_coord_t objh = lv_obj_get_height(slider); in test_textarea_should_have_valid_documented_default_values() 42 TEST_ASSERT_FALSE(lv_obj_has_flag(slider, LV_OBJ_FLAG_SCROLL_CHAIN)); in test_textarea_should_have_valid_documented_default_values() 43 TEST_ASSERT_FALSE(lv_obj_has_flag(slider, LV_OBJ_FLAG_SCROLLABLE)); in test_textarea_should_have_valid_documented_default_values() 49 lv_slider_set_value(slider, 10, LV_ANIM_OFF); in test_slider_event_keys_right_and_up_increment_value_by_one() 50 int32_t value = lv_slider_get_value(slider); in test_slider_event_keys_right_and_up_increment_value_by_one() 52 lv_event_send(slider, LV_EVENT_KEY, (void *) &key); in test_slider_event_keys_right_and_up_increment_value_by_one() 54 int32_t new_value = lv_slider_get_value(slider); in test_slider_event_keys_right_and_up_increment_value_by_one() [all …]
|
/lvgl-3.5.0/examples/get_started/ |
D | lv_example_get_started_3.py | 2 slider = evt.get_target() 5 label.set_text(str(slider.get_value())) 12 slider = lv.slider(lv.scr_act()) variable 13 slider.set_width(200) # Set the width 14 slider.center() # Align to the center of the par… 15 slider.add_event_cb(slider_event_cb, lv.EVENT.VALUE_CHANGED, None) # Assign an event function 20 label.align_to(slider, lv.ALIGN.OUT_TOP_MID, 0, -15) # Align below the slider
|
D | lv_example_get_started_3.c | 8 lv_obj_t * slider = lv_event_get_target(e); in slider_event_cb() local 11 lv_label_set_text_fmt(label, "%"LV_PRId32, lv_slider_get_value(slider)); in slider_event_cb() 12 lv_obj_align_to(label, slider, LV_ALIGN_OUT_TOP_MID, 0, -15); /*Align top of the slider*/ in slider_event_cb() 21 lv_obj_t * slider = lv_slider_create(lv_scr_act()); in lv_example_get_started_3() local 22 lv_obj_set_width(slider, 200); /*Set the width*/ in lv_example_get_started_3() 23 …lv_obj_center(slider); /*Align to the center of the parent (scree… in lv_example_get_started_3() 24 …lv_obj_add_event_cb(slider, slider_event_cb, LV_EVENT_VALUE_CHANGED, NULL); /*Assign an event … in lv_example_get_started_3() 29 lv_obj_align_to(label, slider, LV_ALIGN_OUT_TOP_MID, 0, -15); /*Align top of the slider*/ in lv_example_get_started_3()
|
/lvgl-3.5.0/examples/widgets/slider/ |
D | lv_example_slider_1.py | 6 slider = e.get_target() 7 slider_label.set_text("{:d}%".format(slider.get_value())) 8 slider_label.align_to(slider, lv.ALIGN.OUT_BOTTOM_MID, 0, 10) 11 slider = lv.slider(lv.scr_act()) variable 12 slider.center() 13 slider.add_event_cb(slider_event_cb, lv.EVENT.VALUE_CHANGED, None) 19 slider_label.align_to(slider, lv.ALIGN.OUT_BOTTOM_MID, 0, 10)
|
D | lv_example_slider_3.py | 14 label_text = "{:d} - {:d}".format(obj.get_left_value(),slider.get_value()) 34 slider = lv.slider(lv.scr_act()) variable 35 slider.center() 37 slider.set_mode(lv.slider.MODE.RANGE) 38 slider.set_value(70, lv.ANIM.OFF) 39 slider.set_left_value(20, lv.ANIM.OFF) 41 slider.add_event_cb(slider_event_cb, lv.EVENT.ALL, None) 42 slider.refresh_ext_draw_size()
|
D | lv_example_slider_1.c | 13 lv_obj_t * slider = lv_slider_create(lv_scr_act()); in lv_example_slider_1() local 14 lv_obj_center(slider); in lv_example_slider_1() 15 lv_obj_add_event_cb(slider, slider_event_cb, LV_EVENT_VALUE_CHANGED, NULL); in lv_example_slider_1() 21 lv_obj_align_to(slider_label, slider, LV_ALIGN_OUT_BOTTOM_MID, 0, 10); in lv_example_slider_1() 26 lv_obj_t * slider = lv_event_get_target(e); in slider_event_cb() local 28 lv_snprintf(buf, sizeof(buf), "%d%%", (int)lv_slider_get_value(slider)); in slider_event_cb() 30 lv_obj_align_to(slider_label, slider, LV_ALIGN_OUT_BOTTOM_MID, 0, 10); in slider_event_cb()
|
D | lv_example_slider_2.c | 45 lv_obj_t * slider = lv_slider_create(lv_scr_act()); in lv_example_slider_2() local 46 lv_obj_remove_style_all(slider); /*Remove the styles coming from the theme*/ in lv_example_slider_2() 48 lv_obj_add_style(slider, &style_main, LV_PART_MAIN); in lv_example_slider_2() 49 lv_obj_add_style(slider, &style_indicator, LV_PART_INDICATOR); in lv_example_slider_2() 50 lv_obj_add_style(slider, &style_pressed_color, LV_PART_INDICATOR | LV_STATE_PRESSED); in lv_example_slider_2() 51 lv_obj_add_style(slider, &style_knob, LV_PART_KNOB); in lv_example_slider_2() 52 lv_obj_add_style(slider, &style_pressed_color, LV_PART_KNOB | LV_STATE_PRESSED); in lv_example_slider_2() 54 lv_obj_center(slider); in lv_example_slider_2()
|
D | lv_example_slider_3.c | 13 lv_obj_t * slider; in lv_example_slider_3() local 14 slider = lv_slider_create(lv_scr_act()); in lv_example_slider_3() 15 lv_obj_center(slider); in lv_example_slider_3() 17 lv_slider_set_mode(slider, LV_SLIDER_MODE_RANGE); in lv_example_slider_3() 18 lv_slider_set_value(slider, 70, LV_ANIM_OFF); in lv_example_slider_3() 19 lv_slider_set_left_value(slider, 20, LV_ANIM_OFF); in lv_example_slider_3() 21 lv_obj_add_event_cb(slider, slider_event_cb, LV_EVENT_ALL, NULL); in lv_example_slider_3() 22 lv_obj_refresh_ext_draw_size(slider); in lv_example_slider_3()
|
D | lv_example_slider_2.py | 38 slider = lv.slider(lv.scr_act()) variable 39 slider.remove_style_all() # Remove the styles coming from the theme 41 slider.add_style(style_main, lv.PART.MAIN) 42 slider.add_style(style_indicator, lv.PART.INDICATOR) 43 slider.add_style(style_pressed_color, lv.PART.INDICATOR | lv.STATE.PRESSED) 44 slider.add_style(style_knob, lv.PART.KNOB) 45 slider.add_style(style_pressed_color, lv.PART.KNOB | lv.STATE.PRESSED) 47 slider.center()
|
D | index.rst | 5 .. lv_example:: widgets/slider/lv_example_slider_1 11 .. lv_example:: widgets/slider/lv_example_slider_2 17 .. lv_example:: widgets/slider/lv_example_slider_3
|
/lvgl-3.5.0/docs/widgets/core/ |
D | slider.md | 9 - `LV_PART_MAIN` The background of the slider. Uses all the typical background style properties. `p… 10 - `LV_PART_INDICATOR` The indicator that shows the current state of the slider. Also uses all the t… 11 …ptional corner radius) with side length equal to the smaller side of the slider. The knob can be m… 16 To set an initial value use `lv_slider_set_value(slider, new_value, LV_ANIM_ON/OFF)`. The animatio… 18 To specify the range (min, max values), `lv_slider_set_range(slider, min , max)` can be used. 21 The slider can be one of the following modes: 22 - `LV_SLIDER_MODE_NORMAL` A normal slider as described above 26 The mode can be changed with `lv_slider_set_mode(slider, LV_SLIDER_MODE_...)` 29 Normally, the slider can be adjusted either by dragging the knob, or by clicking on the slider bar. 30 …slider value changes accordingly. In some cases it is desirable to set the slider to react on drag… [all …]
|
D | switch.md | 6 The Switch looks like a little slider and can be used to turn something on and off. 12 …ptional corner radius) with side length equal to the smaller side of the slider. The knob can be m… 32 - `LV_KEY_UP/RIGHT` Turns on the slider 33 - `LV_KEY_DOWN/LEFT` Turns off the slider
|
/lvgl-3.5.0/examples/widgets/img/ |
D | lv_example_img_2.c | 55 lv_obj_t * slider = lv_slider_create(lv_scr_act()); in create_slider() local 56 lv_slider_set_range(slider, 0, 255); in create_slider() 57 lv_obj_set_size(slider, 10, 200); in create_slider() 58 lv_obj_set_style_bg_color(slider, color, LV_PART_KNOB); in create_slider() 59 lv_obj_set_style_bg_color(slider, lv_color_darken(color, LV_OPA_40), LV_PART_INDICATOR); in create_slider() 60 lv_obj_add_event_cb(slider, slider_event_cb, LV_EVENT_VALUE_CHANGED, NULL); in create_slider() 61 return slider; in create_slider()
|
D | lv_example_img_2.py | 26 slider = lv.slider(lv.scr_act()) 27 slider.set_range(0, 255) 28 slider.set_size(10, 200) 29 slider.set_style_bg_color(color, lv.PART.KNOB) 30 slider.set_style_bg_color(color.color_darken(lv.OPA._40), lv.PART.INDICATOR) 31 slider.add_event_cb(slider_event_cb, lv.EVENT.VALUE_CHANGED, None) 32 return slider
|
/lvgl-3.5.0/examples/others/msg/ |
D | lv_example_msg_1.c | 16 lv_obj_t * slider = lv_slider_create(lv_scr_act()); in lv_example_msg_1() local 17 lv_obj_center(slider); in lv_example_msg_1() 18 lv_obj_add_event_cb(slider, slider_event_cb, LV_EVENT_VALUE_CHANGED, NULL); in lv_example_msg_1() 33 lv_obj_t * slider = lv_event_get_target(e); in slider_event_cb() local 34 int32_t v = lv_slider_get_value(slider); in slider_event_cb()
|
D | lv_example_msg_3.c | 66 lv_obj_t * slider = lv_slider_create(panel); in lv_example_msg_3() local 67 lv_obj_set_flex_grow(slider, 1); in lv_example_msg_3() 68 lv_obj_add_flag(slider, LV_OBJ_FLAG_FLEX_IN_NEW_TRACK); in lv_example_msg_3() 69 lv_obj_add_event_cb(slider, slider_event_cb, LV_EVENT_ALL, NULL); in lv_example_msg_3() 70 lv_msg_subsribe_obj(MSG_UPDATE, slider, NULL); in lv_example_msg_3() 139 lv_obj_t * slider = lv_event_get_target(e); in slider_event_cb() local 142 int32_t v = lv_slider_get_value(slider); in slider_event_cb() 149 lv_slider_set_value(slider, *v, LV_ANIM_OFF); in slider_event_cb()
|
/lvgl-3.5.0/demos/widgets/ |
D | lv_demo_widgets.py | 67 def slider_event_cb(slider, e): argument 69 if slider.get_type() == lv.slider.TYPE.NORMAL: 70 slider_value = slider.get_value() 71 … slider.set_style_local_value_str(lv.slider.PART.KNOB, lv.STATE.DEFAULT, str(slider_value)) 73 slider_left=slider.get_left_value() 74 slider_right=slider.get_value() 77 slider.set_style_local_value_str(lv.slider.PART.INDIC, lv.STATE.DEFAULT, slider_string) 183 slider = lv.slider(h, None) 184 slider.set_value(40, lv.ANIM.OFF) 185 slider.set_event_cb(slider_event_cb) [all …]
|
/lvgl-3.5.0/examples/anim/ |
D | lv_example_anim_timeline_1.py | 33 self.slider = lv.slider(self.par) 34 self.slider.add_event_cb(self.slider_prg_event_handler, lv.EVENT.VALUE_CHANGED, None) 35 self.slider.add_flag(lv.obj.FLAG.IGNORE_LAYOUT) 36 self.slider.align(lv.ALIGN.BOTTOM_RIGHT, -20, -20) 37 self.slider.set_range(0, 65535) 119 slider = e.get_target() 124 progress = slider.get_value()
|
D | lv_example_anim_3.py | 56 self.p1_slider = lv.slider(par) 57 self.p2_slider = lv.slider(par) 92 slider = e.get_target() 94 if slider == self.p1_slider: 96 self.p1 = slider.get_value() 100 self.p2 = slider.get_value()
|
D | lv_example_anim_3.c | 103 lv_obj_t * slider = lv_event_get_target(e); in slider_event_cb() local 105 if(slider == ginfo.p1_slider) { in slider_event_cb() 107 ginfo.p1 = lv_slider_get_value(slider); in slider_event_cb() 112 ginfo.p2 = lv_slider_get_value(slider); in slider_event_cb()
|
/lvgl-3.5.0/examples/widgets/menu/ |
D | lv_example_menu_5.c | 176 lv_obj_t * slider = lv_slider_create(obj); in create_slider() local 177 lv_obj_set_flex_grow(slider, 1); in create_slider() 178 lv_slider_set_range(slider, min, max); in create_slider() 179 lv_slider_set_value(slider, val, LV_ANIM_OFF); in create_slider() 182 lv_obj_add_flag(slider, LV_OBJ_FLAG_FLEX_IN_NEW_TRACK); in create_slider()
|