Lines Matching refs:menu
266 static struct menu *current_menu;
286 static void selected_conf(struct menu *menu, struct menu *active_menu);
287 static void conf(struct menu *menu);
288 static void conf_choice(struct menu *menu);
289 static void conf_string(struct menu *menu);
292 static void show_help(struct menu *menu);
297 typedef void (*function_key_handler_t)(int *key, struct menu *menu);
298 static void handle_f1(int *key, struct menu *current_item);
299 static void handle_f2(int *key, struct menu *current_item);
300 static void handle_f3(int *key, struct menu *current_item);
301 static void handle_f4(int *key, struct menu *current_item);
302 static void handle_f5(int *key, struct menu *current_item);
303 static void handle_f6(int *key, struct menu *current_item);
304 static void handle_f7(int *key, struct menu *current_item);
305 static void handle_f8(int *key, struct menu *current_item);
306 static void handle_f9(int *key, struct menu *current_item);
396 static void handle_f1(int *key, struct menu *current_item) in handle_f1()
404 static void handle_f2(int *key, struct menu *current_item) in handle_f2()
411 static void handle_f3(int *key, struct menu *current_item) in handle_f3()
420 static void handle_f4(int *key, struct menu *current_item) in handle_f4()
436 static void handle_f5(int *key, struct menu *current_item) in handle_f5()
443 static void handle_f6(int *key, struct menu *current_item) in handle_f6()
450 static void handle_f7(int *key, struct menu *current_item) in handle_f7()
457 static void handle_f8(int *key, struct menu *current_item) in handle_f8()
464 static void handle_f9(int *key, struct menu *current_item) in handle_f9()
471 static int process_special_keys(int *key, struct menu *menu) in process_special_keys() argument
483 function_keys[i].handler(key, menu); in process_special_keys()
537 static void item_make(struct menu *menu, char tag, const char *fmt, ...) in item_make() argument
546 k_menu_items[items_num].usrptr = menu; in item_make()
547 if (menu != NULL) in item_make()
549 menu_is_visible(menu); in item_make()
759 static void build_conf(struct menu *menu) in build_conf() argument
763 struct menu *child; in build_conf()
768 if (!menu || (!show_all_items && !menu_is_visible(menu))) in build_conf()
771 sym = menu->sym; in build_conf()
772 prop = menu->prompt; in build_conf()
774 if (prop && menu != current_menu) { in build_conf()
775 const char *prompt = menu_get_prompt(menu); in build_conf()
777 ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; in build_conf()
782 item_make(menu, 'm', in build_conf()
784 menu->data ? "-->" : "++>", in build_conf()
787 item_make(menu, 'm', in build_conf()
790 menu_is_empty(menu) ? "----" : "--->"); in build_conf()
792 if (single_menu_mode && menu->data) in build_conf()
798 item_make(menu, ':', in build_conf()
807 item_make(menu, ':', "---%*c%s", in build_conf()
819 struct symbol *def_sym = sym_calc_choice(menu); in build_conf()
820 struct menu *def_menu = NULL; in build_conf()
823 for (child = menu->list; child; child = child->next) { in build_conf()
829 item_make(menu, def_menu ? 't' : ':', " "); in build_conf()
832 ' ', menu_get_prompt(menu)); in build_conf()
837 if (menu == current_menu) { in build_conf()
838 item_make(menu, ':', in build_conf()
840 ' ', menu_get_prompt(menu)); in build_conf()
848 item_make(menu, 't', "[%c]", in build_conf()
851 item_make(menu, 't', "-%c-", in build_conf()
868 item_make(menu, 't', "{%c}", ch); in build_conf()
870 item_make(menu, 't', "<%c>", ch); in build_conf()
872 item_make(menu, 't', "-%c-", ch); in build_conf()
876 item_make(menu, 's', " (%s)", in build_conf()
881 item_add_str("%*c%s%s", tmp, ' ', menu_get_prompt(menu), in build_conf()
887 menu_get_prompt(menu), in build_conf()
890 if (menu->prompt && menu->prompt->type == P_MENU) { in build_conf()
891 item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); in build_conf()
898 for (child = menu->list; child; child = child->next) in build_conf()
1049 static void conf(struct menu *menu) in conf() argument
1051 selected_conf(menu, NULL); in conf()
1054 static void selected_conf(struct menu *menu, struct menu *active_menu) in selected_conf() argument
1056 struct menu *submenu = NULL; in selected_conf()
1069 current_menu = menu; in selected_conf()
1070 build_conf(menu); in selected_conf()
1079 if ((struct menu *) mcur->usrptr == active_menu) { in selected_conf()
1087 show_menu(menu_get_prompt(menu), menu_instructions, in selected_conf()
1107 (struct menu *) item_data())) in selected_conf()
1132 show_help((struct menu *) item_data()); in selected_conf()
1145 if (res == 27 || (menu != &rootmenu && res == KEY_LEFT)) in selected_conf()
1155 submenu = (struct menu *) item_data(); in selected_conf()
1216 static void show_help(struct menu *menu) in show_help() argument
1220 if (!menu) in show_help()
1224 menu_get_ext_help(menu, &help); in show_help()
1225 show_scroll_win(main_window, menu_get_prompt(menu), str_get(&help)); in show_help()
1229 static void conf_choice(struct menu *menu) in conf_choice() argument
1231 const char *prompt = menu_get_prompt(menu); in conf_choice()
1232 struct menu *child = NULL; in conf_choice()
1243 active = sym_calc_choice(menu); in conf_choice()
1248 for (i = 0, child = menu->list; child; child = child->next) { in conf_choice()
1252 if (child->sym == sym_calc_choice(menu)) in conf_choice()
1290 (struct menu *) item_data())) in conf_choice()
1315 show_help((struct menu *) item_data()); in conf_choice()
1335 choice_set_value(menu, child->sym); in conf_choice()
1348 static void conf_string(struct menu *menu) in conf_string() argument
1350 const char *prompt = menu_get_prompt(menu); in conf_string()
1356 switch (sym_get_type(menu->sym)) { in conf_string()
1372 sym_get_string_value(menu->sym), in conf_string()
1377 if (sym_set_string_value(menu->sym, in conf_string()
1384 show_help(menu); in conf_string()