Lines Matching refs:menu

22     lv_obj_t * menu = lv_menu_create(lv_scr_act());  in lv_example_menu_5()  local
24 lv_color_t bg_color = lv_obj_get_style_bg_color(menu, 0); in lv_example_menu_5()
26 lv_obj_set_style_bg_color(menu, lv_color_darken(lv_obj_get_style_bg_color(menu, 0), 10), 0); in lv_example_menu_5()
29 lv_obj_set_style_bg_color(menu, lv_color_darken(lv_obj_get_style_bg_color(menu, 0), 50), 0); in lv_example_menu_5()
31 lv_menu_set_mode_root_back_btn(menu, LV_MENU_ROOT_BACK_BTN_ENABLED); in lv_example_menu_5()
32 lv_obj_add_event_cb(menu, back_event_handler, LV_EVENT_CLICKED, menu); in lv_example_menu_5()
33 lv_obj_set_size(menu, lv_disp_get_hor_res(NULL), lv_disp_get_ver_res(NULL)); in lv_example_menu_5()
34 lv_obj_center(menu); in lv_example_menu_5()
40 lv_obj_t * sub_mechanics_page = lv_menu_page_create(menu, NULL); in lv_example_menu_5()
41 …_style_pad_hor(sub_mechanics_page, lv_obj_get_style_pad_left(lv_menu_get_main_header(menu), 0), 0); in lv_example_menu_5()
48 lv_obj_t * sub_sound_page = lv_menu_page_create(menu, NULL); in lv_example_menu_5()
49 …lv_obj_set_style_pad_hor(sub_sound_page, lv_obj_get_style_pad_left(lv_menu_get_main_header(menu), … in lv_example_menu_5()
54 lv_obj_t * sub_display_page = lv_menu_page_create(menu, NULL); in lv_example_menu_5()
55 …et_style_pad_hor(sub_display_page, lv_obj_get_style_pad_left(lv_menu_get_main_header(menu), 0), 0); in lv_example_menu_5()
60 lv_obj_t * sub_software_info_page = lv_menu_page_create(menu, NULL); in lv_example_menu_5()
61 …le_pad_hor(sub_software_info_page, lv_obj_get_style_pad_left(lv_menu_get_main_header(menu), 0), 0); in lv_example_menu_5()
65 lv_obj_t * sub_legal_info_page = lv_menu_page_create(menu, NULL); in lv_example_menu_5()
66 …style_pad_hor(sub_legal_info_page, lv_obj_get_style_pad_left(lv_menu_get_main_header(menu), 0), 0); in lv_example_menu_5()
74 lv_obj_t * sub_about_page = lv_menu_page_create(menu, NULL); in lv_example_menu_5()
75 …lv_obj_set_style_pad_hor(sub_about_page, lv_obj_get_style_pad_left(lv_menu_get_main_header(menu), … in lv_example_menu_5()
79 lv_menu_set_load_page_event(menu, cont, sub_software_info_page); in lv_example_menu_5()
81 lv_menu_set_load_page_event(menu, cont, sub_legal_info_page); in lv_example_menu_5()
83 lv_obj_t * sub_menu_mode_page = lv_menu_page_create(menu, NULL); in lv_example_menu_5()
84 …_style_pad_hor(sub_menu_mode_page, lv_obj_get_style_pad_left(lv_menu_get_main_header(menu), 0), 0); in lv_example_menu_5()
88 lv_obj_add_event_cb(lv_obj_get_child(cont, 2), switch_handler, LV_EVENT_VALUE_CHANGED, menu); in lv_example_menu_5()
91 root_page = lv_menu_page_create(menu, "Settings"); in lv_example_menu_5()
92 …lv_obj_set_style_pad_hor(root_page, lv_obj_get_style_pad_left(lv_menu_get_main_header(menu), 0), 0… in lv_example_menu_5()
95 lv_menu_set_load_page_event(menu, cont, sub_mechanics_page); in lv_example_menu_5()
97 lv_menu_set_load_page_event(menu, cont, sub_sound_page); in lv_example_menu_5()
99 lv_menu_set_load_page_event(menu, cont, sub_display_page); in lv_example_menu_5()
104 lv_menu_set_load_page_event(menu, cont, sub_about_page); in lv_example_menu_5()
106 lv_menu_set_load_page_event(menu, cont, sub_menu_mode_page); in lv_example_menu_5()
108 lv_menu_set_sidebar_page(menu, root_page); in lv_example_menu_5()
110 …lv_event_send(lv_obj_get_child(lv_obj_get_child(lv_menu_get_cur_sidebar_page(menu), 0), 0), LV_EVE… in lv_example_menu_5()
116 lv_obj_t * menu = lv_event_get_user_data(e); in back_event_handler() local
118 if(lv_menu_back_btn_is_root(menu, obj)) { in back_event_handler()
127 lv_obj_t * menu = lv_event_get_user_data(e); in switch_handler() local
131 lv_menu_set_page(menu, NULL); in switch_handler()
132 lv_menu_set_sidebar_page(menu, root_page); in switch_handler()
133 …lv_event_send(lv_obj_get_child(lv_obj_get_child(lv_menu_get_cur_sidebar_page(menu), 0), 0), LV_EVE… in switch_handler()
136 lv_menu_set_sidebar_page(menu, NULL); in switch_handler()
137 … lv_menu_clear_history(menu); /* Clear history because we will be showing the root page later */ in switch_handler()
138 lv_menu_set_page(menu, root_page); in switch_handler()