Home
last modified time | relevance | path

Searched refs:LV_STATE_CHECKED (Results 1 – 25 of 33) sorted by relevance

12

/lvgl-3.4.0/examples/widgets/checkbox/
Dlv_example_checkbox_2.c19 lv_obj_clear_state(old_cb, LV_STATE_CHECKED); /*Uncheck the previous radio button*/ in radio_event_handler()
20 lv_obj_add_state(act_cb, LV_STATE_CHECKED); /*Uncheck the current radio button*/ in radio_event_handler()
34 lv_obj_add_style(obj, &style_radio_chk, LV_PART_INDICATOR | LV_STATE_CHECKED); in radiobutton_create()
68 lv_obj_add_state(lv_obj_get_child(cont1, 0), LV_STATE_CHECKED); in lv_example_checkbox_2()
82 lv_obj_add_state(lv_obj_get_child(cont2, 0), LV_STATE_CHECKED); in lv_example_checkbox_2()
Dlv_example_checkbox_1.c10 const char * state = lv_obj_get_state(obj) & LV_STATE_CHECKED ? "Checked" : "Unchecked"; in event_handler()
27 lv_obj_add_state(cb, LV_STATE_CHECKED); in lv_example_checkbox_1()
36 lv_obj_add_state(cb, LV_STATE_CHECKED | LV_STATE_DISABLED); in lv_example_checkbox_1()
/lvgl-3.4.0/examples/widgets/switch/
Dlv_example_switch_1.c9 LV_LOG_USER("State: %s\n", lv_obj_has_state(obj, LV_STATE_CHECKED) ? "On" : "Off"); in event_handler()
24 lv_obj_add_state(sw, LV_STATE_CHECKED); in lv_example_switch_1()
32 lv_obj_add_state(sw, LV_STATE_CHECKED | LV_STATE_DISABLED); in lv_example_switch_1()
/lvgl-3.4.0/docs/widgets/core/
Dswitch.md21 The switch uses the standard `LV_STATE_CHECKED` state.
23 …rent state of the switch (with `true` being on), use `lv_obj_has_state(switch, LV_STATE_CHECKED)`.
25 Call `lv_obj_add_state(switch, LV_STATE_CHECKED)` to turn it on, or `lv_obj_clear_state(switch, LV_…
Dcheckbox.md32 lv_obj_add_state(cb, LV_STATE_CHECKED); /*Make the chekbox checked*/
33 lv_obj_clear_state(cb, LV_STATE_CHECKED); /*MAke the checkbox unchecked*/
34 lv_obj_add_state(cb, LV_STATE_CHECKED | LV_STATE_DISABLED); /*Make the checkbox checked and disable…
/lvgl-3.4.0/tests/src/test_cases/
Dtest_switch.c86 TEST_ASSERT(lv_obj_has_state(sw, LV_STATE_CHECKED)); in test_switch_animation()
92 TEST_ASSERT_FALSE(lv_obj_has_state(sw, LV_STATE_CHECKED)); in test_switch_animation()
137 TEST_ASSERT(lv_obj_has_state(sw, LV_STATE_CHECKED)); in test_switch_should_state_change_when_event_bubbling_is_enabled()
Dtest_checkbox.c42 lv_obj_add_state(checkbox, LV_STATE_CHECKED); in test_checkbox_should_call_event_handler_on_click_when_enabled()
/lvgl-3.4.0/examples/anim/
Dlv_example_anim_1.c14 if(lv_obj_has_state(sw, LV_STATE_CHECKED)) { in sw_event_cb()
48 lv_obj_add_state(sw, LV_STATE_CHECKED); in lv_example_anim_1()
Dlv_example_anim_timeline_1.c100 bool reverse = lv_obj_has_state(btn, LV_STATE_CHECKED); in btn_start_event_handler()
/lvgl-3.4.0/examples/widgets/list/
Dlv_example_list_2.c35 lv_obj_add_state(child, LV_STATE_CHECKED); in event_handler()
39 lv_obj_clear_state(child, LV_STATE_CHECKED); in event_handler()
150 lv_obj_add_state(currentButton, LV_STATE_CHECKED); in lv_example_list_2()
/lvgl-3.4.0/demos/music/
Dlv_demo_music_list.c139 lv_obj_add_state(btn, LV_STATE_CHECKED); in _lv_demo_music_list_btn_check()
144 lv_obj_clear_state(btn, LV_STATE_CHECKED); in _lv_demo_music_list_btn_check()
171 lv_obj_add_style(btn, &style_btn_chk, LV_STATE_CHECKED); in add_list_btn()
/lvgl-3.4.0/examples/widgets/dropdown/
Dlv_example_dropdown_3.c35 lv_obj_set_style_transform_angle(dropdown, 1800, LV_PART_INDICATOR | LV_STATE_CHECKED); in lv_example_dropdown_3()
/lvgl-3.4.0/src/extra/widgets/imgbtn/
Dlv_imgbtn.c102 obj_state |= LV_STATE_CHECKED; in lv_imgbtn_set_state()
105 lv_obj_clear_state(obj, LV_STATE_CHECKED | LV_STATE_PRESSED | LV_STATE_DISABLED); in lv_imgbtn_set_state()
363 if(obj_state & LV_STATE_CHECKED) return LV_IMGBTN_STATE_CHECKED_DISABLED; in get_state()
367 if(obj_state & LV_STATE_CHECKED) { in get_state()
/lvgl-3.4.0/src/extra/themes/mono/
Dlv_theme_mono.c248 lv_obj_add_style(obj, &styles->inv, LV_STATE_CHECKED); in theme_apply()
273 lv_obj_add_style(obj, &styles->inv, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
285 lv_obj_add_style(obj, &styles->inv, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
330 lv_obj_add_style(obj, &styles->inv, LV_PART_INDICATOR | LV_STATE_CHECKED); in theme_apply()
384 lv_obj_add_style(obj, &styles->inv, LV_PART_SELECTED | LV_STATE_CHECKED); in theme_apply()
436 lv_obj_add_style(obj, &styles->inv, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
/lvgl-3.4.0/examples/scroll/
Dlv_example_scroll_2.c12 if(lv_obj_has_state(sw, LV_STATE_CHECKED)) lv_obj_add_flag(list, LV_OBJ_FLAG_SCROLL_ONE); in sw_event_cb()
/lvgl-3.4.0/src/extra/themes/default/
Dlv_theme_default.c759 lv_obj_add_style(obj, &styles->bg_color_secondary, LV_STATE_CHECKED); in theme_apply()
787 lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
799 … lv_obj_add_style(obj, &styles->bg_color_primary_muted, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
800 lv_obj_add_style(obj, &styles->tab_btn, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
827 lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
885 lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_INDICATOR | LV_STATE_CHECKED); in theme_apply()
886 lv_obj_add_style(obj, &styles->cb_marker_checked, LV_PART_INDICATOR | LV_STATE_CHECKED); in theme_apply()
903 lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_INDICATOR | LV_STATE_CHECKED); in theme_apply()
911 lv_obj_add_style(obj, &styles->transition_normal, LV_PART_INDICATOR | LV_STATE_CHECKED); in theme_apply()
961 lv_obj_add_style(obj, &styles->bg_color_primary, LV_PART_SELECTED | LV_STATE_CHECKED); in theme_apply()
[all …]
/lvgl-3.4.0/src/extra/themes/basic/
Dlv_theme_basic.c269 lv_obj_add_style(obj, &styles->dark, LV_PART_INDICATOR | LV_STATE_CHECKED); in theme_apply()
276 lv_obj_add_style(obj, &styles->dark, LV_PART_INDICATOR | LV_STATE_CHECKED); in theme_apply()
306 lv_obj_add_style(obj, &styles->dark, LV_PART_SELECTED | LV_STATE_CHECKED); in theme_apply()
367 lv_obj_add_style(obj, &styles->light, LV_PART_ITEMS | LV_STATE_CHECKED); in theme_apply()
/lvgl-3.4.0/examples/widgets/tabview/
Dlv_example_tabview_2.c25 lv_obj_set_style_border_side(tab_btns, LV_BORDER_SIDE_RIGHT, LV_PART_ITEMS | LV_STATE_CHECKED); in lv_example_tabview_2()
/lvgl-3.4.0/demos/stress/
Dlv_demo_stress.c181 lv_obj_add_state(obj, LV_STATE_CHECKED); in obj_test_task_cb()
389 lv_obj_add_state(obj, LV_STATE_CHECKED); in obj_test_task_cb()
392 lv_obj_add_state(obj, LV_STATE_CHECKED | LV_STATE_DISABLED); in obj_test_task_cb()
/lvgl-3.4.0/src/widgets/
Dlv_switch.c184 bool chk = lv_obj_get_state(obj) & LV_STATE_CHECKED; in draw_main()
246 bool chk = lv_obj_get_state(obj) & LV_STATE_CHECKED; in lv_switch_trigger_anim()
Dlv_dropdown.c432 lv_obj_add_state(dropdown_obj, LV_STATE_CHECKED); in lv_dropdown_open()
528 lv_obj_clear_state(obj, LV_STATE_CHECKED); in lv_dropdown_close()
885 … draw_box(dropdown_obj, draw_ctx, dropdown->pr_opt_id, LV_STATE_CHECKED | LV_STATE_PRESSED); in draw_list()
886 … draw_box_label(dropdown_obj, draw_ctx, dropdown->pr_opt_id, LV_STATE_CHECKED | LV_STATE_PRESSED); in draw_list()
891 draw_box(dropdown_obj, draw_ctx, dropdown->sel_opt_id, LV_STATE_CHECKED); in draw_list()
892 draw_box_label(dropdown_obj, draw_ctx, dropdown->sel_opt_id, LV_STATE_CHECKED); in draw_list()
/lvgl-3.4.0/examples/widgets/menu/
Dlv_example_menu_5.c127 if(lv_obj_has_state(obj, LV_STATE_CHECKED)) { in switch_handler()
188 lv_obj_add_state(sw, chk ? LV_STATE_CHECKED : 0); in create_switch()
/lvgl-3.4.0/src/core/
Dlv_obj.c722 if(!(lv_obj_get_state(obj) & LV_STATE_CHECKED)) lv_obj_add_state(obj, LV_STATE_CHECKED); in lv_obj_event()
723 else lv_obj_clear_state(obj, LV_STATE_CHECKED); in lv_obj_event()
743 lv_obj_add_state(obj, LV_STATE_CHECKED); in lv_obj_event()
746 lv_obj_clear_state(obj, LV_STATE_CHECKED); in lv_obj_event()
Dlv_obj.h43 LV_STATE_CHECKED = 0x0001, enumerator
/lvgl-3.4.0/src/extra/widgets/menu/
Dlv_menu.c215 lv_obj_add_state(menu->selected_tab, LV_STATE_CHECKED); in lv_menu_set_page()
218 lv_obj_clear_state(menu->selected_tab, LV_STATE_CHECKED); in lv_menu_set_page()
668 lv_obj_clear_state(menu->selected_tab, LV_STATE_CHECKED); in lv_menu_load_page_event_cb()

12