Lines Matching refs:menu

263 static struct menu *current_menu;
284 static void selected_conf(struct menu *menu, struct menu *active_menu);
285 static void conf(struct menu *menu);
286 static void conf_choice(struct menu *menu);
287 static void conf_string(struct menu *menu);
290 static void show_help(struct menu *menu);
295 typedef void (*function_key_handler_t)(int *key, struct menu *menu);
296 static void handle_f1(int *key, struct menu *current_item);
297 static void handle_f2(int *key, struct menu *current_item);
298 static void handle_f3(int *key, struct menu *current_item);
299 static void handle_f4(int *key, struct menu *current_item);
300 static void handle_f5(int *key, struct menu *current_item);
301 static void handle_f6(int *key, struct menu *current_item);
302 static void handle_f7(int *key, struct menu *current_item);
303 static void handle_f8(int *key, struct menu *current_item);
304 static void handle_f9(int *key, struct menu *current_item);
394 static void handle_f1(int *key, struct menu *current_item) in handle_f1()
402 static void handle_f2(int *key, struct menu *current_item) in handle_f2()
409 static void handle_f3(int *key, struct menu *current_item) in handle_f3()
418 static void handle_f4(int *key, struct menu *current_item) in handle_f4()
434 static void handle_f5(int *key, struct menu *current_item) in handle_f5()
441 static void handle_f6(int *key, struct menu *current_item) in handle_f6()
448 static void handle_f7(int *key, struct menu *current_item) in handle_f7()
455 static void handle_f8(int *key, struct menu *current_item) in handle_f8()
462 static void handle_f9(int *key, struct menu *current_item) in handle_f9()
469 static int process_special_keys(int *key, struct menu *menu) in process_special_keys() argument
481 function_keys[i].handler(key, menu); in process_special_keys()
535 static void item_make(struct menu *menu, char tag, const char *fmt, ...) in item_make() argument
544 k_menu_items[items_num].usrptr = menu; in item_make()
545 if (menu != NULL) in item_make()
547 menu_is_visible(menu); in item_make()
696 struct menu *target;
808 static void build_conf(struct menu *menu) in build_conf() argument
812 struct menu *child; in build_conf()
817 if (!menu || (!show_all_items && !menu_is_visible(menu))) in build_conf()
820 sym = menu->sym; in build_conf()
821 prop = menu->prompt; in build_conf()
823 if (prop && menu != current_menu) { in build_conf()
824 const char *prompt = menu_get_prompt(menu); in build_conf()
826 ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN; in build_conf()
831 item_make(menu, 'm', in build_conf()
833 menu->data ? "-->" : "++>", in build_conf()
836 item_make(menu, 'm', in build_conf()
839 menu_is_empty(menu) ? "----" : "--->"); in build_conf()
841 if (single_menu_mode && menu->data) in build_conf()
847 item_make(menu, ':', in build_conf()
856 item_make(menu, ':', "---%*c%s", in build_conf()
869 struct menu *def_menu = NULL; in build_conf()
872 for (child = menu->list; child; child = child->next) { in build_conf()
881 item_make(menu, 't', "[%c]", in build_conf()
896 item_make(menu, 't', "<%c>", ch); in build_conf()
900 item_make(menu, def_menu ? 't' : ':', " "); in build_conf()
904 ' ', menu_get_prompt(menu)); in build_conf()
919 if (menu == current_menu) { in build_conf()
920 item_make(menu, ':', in build_conf()
922 ' ', menu_get_prompt(menu)); in build_conf()
928 item_make(menu, ':', " "); in build_conf()
933 item_make(menu, 't', "[%c]", in build_conf()
936 item_make(menu, 't', "-%c-", in build_conf()
953 item_make(menu, in build_conf()
956 item_make(menu, in build_conf()
959 item_make(menu, 't', "-%c-", ch); in build_conf()
963 item_make(menu, 's', " (%s)", in build_conf()
969 menu_get_prompt(menu), in build_conf()
977 menu_get_prompt(menu), in build_conf()
980 if (menu->prompt && menu->prompt->type == P_MENU) { in build_conf()
981 item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->"); in build_conf()
988 for (child = menu->list; child; child = child->next) in build_conf()
1139 static void conf(struct menu *menu) in conf() argument
1141 selected_conf(menu, NULL); in conf()
1144 static void selected_conf(struct menu *menu, struct menu *active_menu) in selected_conf() argument
1146 struct menu *submenu = NULL; in selected_conf()
1159 current_menu = menu; in selected_conf()
1160 build_conf(menu); in selected_conf()
1169 if ((struct menu *) mcur->usrptr == active_menu) { in selected_conf()
1177 show_menu(menu_get_prompt(menu), menu_instructions, in selected_conf()
1197 (struct menu *) item_data())) in selected_conf()
1222 show_help((struct menu *) item_data()); in selected_conf()
1235 if (res == 27 || (menu != &rootmenu && res == KEY_LEFT)) in selected_conf()
1245 submenu = (struct menu *) item_data(); in selected_conf()
1307 static void show_help(struct menu *menu) in show_help() argument
1311 if (!menu) in show_help()
1315 menu_get_ext_help(menu, &help); in show_help()
1316 show_scroll_win(main_window, menu_get_prompt(menu), str_get(&help)); in show_help()
1320 static void conf_choice(struct menu *menu) in conf_choice() argument
1322 const char *prompt = menu_get_prompt(menu); in conf_choice()
1323 struct menu *child = NULL; in conf_choice()
1334 active = sym_get_choice_value(menu->sym); in conf_choice()
1339 for (i = 0, child = menu->list; child; child = child->next) { in conf_choice()
1343 if (child->sym == sym_get_choice_value(menu->sym)) in conf_choice()
1381 (struct menu *) item_data())) in conf_choice()
1406 show_help((struct menu *) item_data()); in conf_choice()
1439 static void conf_string(struct menu *menu) in conf_string() argument
1441 const char *prompt = menu_get_prompt(menu); in conf_string()
1447 switch (sym_get_type(menu->sym)) { in conf_string()
1463 sym_get_string_value(menu->sym), in conf_string()
1468 if (sym_set_string_value(menu->sym, in conf_string()
1475 show_help(menu); in conf_string()