Lines Matching refs:menu
5 * Introduced single menu mode (show all sub-menus in one large tree).
63 "o To exit a menu use the cursor keys to highlight the <Exit> button\n"
121 "At the end of the main menu you will find two options. One is\n"
153 "menu, rather than the default multimenu hierarchy, run the menuconfig\n"
179 "Arrow keys navigate the menu. "
252 "o The line 'Prompt:' shows the text used in the menu structure for\n"
257 " this symbol to be visible in the menu (selectable)\n"
258 "o The 'Location:' lines tell where in the menu structure this symbol\n"
261 " menu item - and current value is displayed inside brackets.\n"
278 static struct menu *current_menu;
282 static void conf(struct menu *menu);
283 static void conf_choice(struct menu *menu);
284 static void conf_string(struct menu *menu);
289 static void show_help(struct menu *menu);
329 struct menu *submenu[8], *menu;
332 str_printf(r, " Defined at %s:%d\n", prop->menu->file->name,
333 prop->menu->lineno);
339 menu = prop->menu->parent;
340 for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent)
341 submenu[i++] = menu;
345 menu = submenu[i];
346 str_printf(r, "%*c-> %s", j, ' ', menu_get_prompt(menu));
347 if (menu->sym) {
348 str_printf(r, " (%s [=%s])", menu->sym->name ?
349 menu->sym->name : "<choice>",
350 sym_get_string_value(menu->sym));
425 static void build_conf(struct menu *menu)
429 struct menu *child;
434 if (!menu_is_visible(menu))
437 sym = menu->sym;
438 prop = menu->prompt;
440 if (prop && menu != current_menu) {
441 const char *prompt = menu_get_prompt(menu);
447 menu->data ? "-->" : "++>",
453 item_set_data(menu);
454 if (single_menu_mode && menu->data)
462 item_set_data(menu);
473 struct menu *def_menu = NULL;
476 for (child = menu->list; child; child = child->next) {
497 item_set_data(menu);
501 item_set_data(menu);
504 item_add_str("%*c%s", indent + 1, ' ', menu_get_prompt(menu));
518 if (menu == current_menu) {
519 item_make("---%*c%s", indent + 1, ' ', menu_get_prompt(menu));
521 item_set_data(menu);
529 item_set_data(menu);
538 item_set_data(menu);
551 item_set_data(menu);
559 item_add_str("%*c%s%s", tmp, ' ', menu_get_prompt(menu),
563 item_set_data(menu);
567 item_add_str("%*c%s%s", indent + 1, ' ', menu_get_prompt(menu),
570 if (menu->prompt->type == P_MENU) {
578 for (child = menu->list; child; child = child->next)
583 static void conf(struct menu *menu)
585 struct menu *submenu;
586 const char *prompt = menu_get_prompt(menu);
588 struct menu *active_menu = NULL;
594 current_menu = menu;
595 build_conf(menu);
598 if (menu == &rootmenu) {
696 static void show_help(struct menu *menu)
699 struct symbol *sym = menu->sym;
712 show_helptext(menu_get_prompt(menu), str_get(&help));
716 static void conf_choice(struct menu *menu)
718 const char *prompt = menu_get_prompt(menu);
719 struct menu *child;
722 active = sym_get_choice_value(menu->sym);
728 current_menu = menu;
729 for (child = menu->list; child; child = child->next) {
736 if (child->sym == sym_get_choice_value(menu->sym))
757 show_help(menu);
767 static void conf_string(struct menu *menu)
769 const char *prompt = menu_get_prompt(menu);
775 switch (sym_get_type(menu->sym)) {
791 sym_get_string_value(menu->sym));
794 if (sym_set_string_value(menu->sym, dialog_input_result))
799 show_help(menu);