Lines Matching defs:menu

28 "o  Local help:  To get help related to the current menu entry, use any\n"
64 "Go back to parent menu <Left> <Esc> <F5>\n"
68 "Start incremental, case-insensitive search for STRING in menu entries,\n"
74 "Exit menu search mode </> <Esc>\n"
121 "Single menu mode\n"
123 "If you prefer to have all of the menu entries listed in a single menu,\n"
130 "is already unfolded. Folded menu entries will be designated by a\n"
143 "Exit a submenu to its parent menu with <Esc> or <Left>.\n"
146 "To search for menu entries press </>.\n"
152 "For help related to the current menu entry press <?> or <h>.\n",
160 "Exit a submenu to its parent menu with <Esc> or <Left>.\n"
163 "To search for menu entries press </>.\n"
168 "For help related to the current menu entry press <?> or <h>.\n",
230 " the menu hierarchy.\n"
234 " this symbol to be visible and selectable in the menu.\n"
235 "o The 'Location:' lines tell, where in the menu structure this symbol\n"
238 " a selectable menu item, and the current value is displayed inside\n"
242 " after exiting this new menu.\n"
265 static struct menu *current_menu;
270 /* the largest size of the menu window */
285 static void selected_conf(struct menu *menu, struct menu *active_menu);
286 static void conf(struct menu *menu);
287 static void conf_choice(struct menu *menu);
288 static void conf_string(struct menu *menu);
291 static void show_help(struct menu *menu);
296 typedef void (*function_key_handler_t)(int *key, struct menu *menu);
297 static void handle_f1(int *key, struct menu *current_item);
298 static void handle_f2(int *key, struct menu *current_item);
299 static void handle_f3(int *key, struct menu *current_item);
300 static void handle_f4(int *key, struct menu *current_item);
301 static void handle_f5(int *key, struct menu *current_item);
302 static void handle_f6(int *key, struct menu *current_item);
303 static void handle_f7(int *key, struct menu *current_item);
304 static void handle_f8(int *key, struct menu *current_item);
305 static void handle_f9(int *key, struct menu *current_item);
395 static void handle_f1(int *key, struct menu *current_item)
403 static void handle_f2(int *key, struct menu *current_item)
410 static void handle_f3(int *key, struct menu *current_item)
419 static void handle_f4(int *key, struct menu *current_item)
435 static void handle_f5(int *key, struct menu *current_item)
442 static void handle_f6(int *key, struct menu *current_item)
449 static void handle_f7(int *key, struct menu *current_item)
456 static void handle_f8(int *key, struct menu *current_item)
463 static void handle_f9(int *key, struct menu *current_item)
470 static int process_special_keys(int *key, struct menu *menu)
482 function_keys[i].handler(key, menu);
508 /* Do not search if the menu is empty (i.e. items_num == 0) */
536 static void item_make(struct menu *menu, char tag, const char *fmt, ...)
545 k_menu_items[items_num].usrptr = menu;
546 if (menu != NULL)
548 menu_is_visible(menu);
758 static void build_conf(struct menu *menu)
762 struct menu *child;
767 if (!menu || (!show_all_items && !menu_is_visible(menu)))
770 sym = menu->sym;
771 prop = menu->prompt;
773 if (prop && menu != current_menu) {
774 const char *prompt = menu_get_prompt(menu);
776 ptype = menu->prompt ? menu->prompt->type : P_UNKNOWN;
781 item_make(menu, 'm',
783 menu->data ? "-->" : "++>",
786 item_make(menu, 'm',
789 menu_is_empty(menu) ? "----" : "--->");
791 if (single_menu_mode && menu->data)
797 item_make(menu, ':',
806 item_make(menu, ':', "---%*c%s",
819 struct menu *def_menu = NULL;
822 for (child = menu->list; child; child = child->next) {
831 item_make(menu, 't', "[%c]",
846 item_make(menu, 't', "<%c>", ch);
850 item_make(menu, def_menu ? 't' : ':', " ");
854 ' ', menu_get_prompt(menu));
869 if (menu == current_menu) {
870 item_make(menu, ':',
872 ' ', menu_get_prompt(menu));
878 item_make(menu, ':', " ");
883 item_make(menu, 't', "[%c]",
886 item_make(menu, 't', "-%c-",
903 item_make(menu,
906 item_make(menu,
909 item_make(menu, 't', "-%c-", ch);
913 item_make(menu, 's', " (%s)",
919 menu_get_prompt(menu),
927 menu_get_prompt(menu),
930 if (menu->prompt && menu->prompt->type == P_MENU) {
931 item_add_str(" %s", menu_is_empty(menu) ? "----" : "--->");
938 for (child = menu->list; child; child = child->next)
949 /* adjust the menu to show this item.
950 * prefer not to scroll the menu if possible*/
993 /* position the menu at the middle of the screen */
1015 /* Post the menu */
1089 static void conf(struct menu *menu)
1091 selected_conf(menu, NULL);
1094 static void selected_conf(struct menu *menu, struct menu *active_menu)
1096 struct menu *submenu = NULL;
1109 current_menu = menu;
1110 build_conf(menu);
1119 if ((struct menu *) mcur->usrptr == active_menu) {
1127 show_menu(menu_get_prompt(menu), menu_instructions,
1147 (struct menu *) item_data()))
1172 show_help((struct menu *) item_data());
1185 if (res == 27 || (menu != &rootmenu && res == KEY_LEFT))
1188 /* remember location in the menu */
1195 submenu = (struct menu *) item_data();
1257 static void show_help(struct menu *menu)
1261 if (!menu)
1265 menu_get_ext_help(menu, &help);
1266 show_scroll_win(main_window, menu_get_prompt(menu), str_get(&help));
1270 static void conf_choice(struct menu *menu)
1272 const char *prompt = menu_get_prompt(menu);
1273 struct menu *child = NULL;
1284 active = sym_get_choice_value(menu->sym);
1289 for (i = 0, child = menu->list; child; child = child->next) {
1293 if (child->sym == sym_get_choice_value(menu->sym))
1331 (struct menu *) item_data()))
1356 show_help((struct menu *) item_data());
1389 static void conf_string(struct menu *menu)
1391 const char *prompt = menu_get_prompt(menu);
1397 switch (sym_get_type(menu->sym)) {
1413 sym_get_string_value(menu->sym),
1418 if (sym_set_string_value(menu->sym,
1425 show_help(menu);
1505 /* set up the menu and menu window */
1559 /* set btns menu */