Lines Matching refs:menu

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; in get_prompt_str() local
332 str_printf(r, " Defined at %s:%d\n", prop->menu->file->name, in get_prompt_str()
333 prop->menu->lineno); in get_prompt_str()
339 menu = prop->menu->parent; in get_prompt_str()
340 for (i = 0; menu != &rootmenu && i < 8; menu = menu->parent) in get_prompt_str()
341 submenu[i++] = menu; in get_prompt_str()
345 menu = submenu[i]; in get_prompt_str()
346 str_printf(r, "%*c-> %s", j, ' ', menu_get_prompt(menu)); in get_prompt_str()
347 if (menu->sym) { in get_prompt_str()
348 str_printf(r, " (%s [=%s])", menu->sym->name ? in get_prompt_str()
349 menu->sym->name : "<choice>", in get_prompt_str()
350 sym_get_string_value(menu->sym)); in get_prompt_str()
425 static void build_conf(struct menu *menu) in build_conf() argument
429 struct menu *child; in build_conf()
434 if (!menu_is_visible(menu)) in build_conf()
437 sym = menu->sym; in build_conf()
438 prop = menu->prompt; in build_conf()
440 if (prop && menu != current_menu) { in build_conf()
441 const char *prompt = menu_get_prompt(menu); in build_conf()
447 menu->data ? "-->" : "++>", in build_conf()
453 item_set_data(menu); in build_conf()
454 if (single_menu_mode && menu->data) in build_conf()
462 item_set_data(menu); in build_conf()
473 struct menu *def_menu = NULL; in build_conf()
476 for (child = menu->list; child; child = child->next) { in build_conf()
497 item_set_data(menu); in build_conf()
501 item_set_data(menu); in build_conf()
504 item_add_str("%*c%s", indent + 1, ' ', menu_get_prompt(menu)); in build_conf()
518 if (menu == current_menu) { in build_conf()
519 item_make("---%*c%s", indent + 1, ' ', menu_get_prompt(menu)); in build_conf()
521 item_set_data(menu); in build_conf()
529 item_set_data(menu); in build_conf()
538 item_set_data(menu); in build_conf()
551 item_set_data(menu); in build_conf()
559 item_add_str("%*c%s%s", tmp, ' ', menu_get_prompt(menu), in build_conf()
563 item_set_data(menu); in build_conf()
567 item_add_str("%*c%s%s", indent + 1, ' ', menu_get_prompt(menu), in build_conf()
570 if (menu->prompt->type == P_MENU) { in build_conf()
578 for (child = menu->list; child; child = child->next) in build_conf()
583 static void conf(struct menu *menu) in conf() argument
585 struct menu *submenu; in conf()
586 const char *prompt = menu_get_prompt(menu); in conf()
588 struct menu *active_menu = NULL; in conf()
594 current_menu = menu; in conf()
595 build_conf(menu); in conf()
598 if (menu == &rootmenu) { in conf()
696 static void show_help(struct menu *menu) in show_help() argument
699 struct symbol *sym = menu->sym; in show_help()
712 show_helptext(menu_get_prompt(menu), str_get(&help)); in show_help()
716 static void conf_choice(struct menu *menu) in conf_choice() argument
718 const char *prompt = menu_get_prompt(menu); in conf_choice()
719 struct menu *child; in conf_choice()
722 active = sym_get_choice_value(menu->sym); in conf_choice()
728 current_menu = menu; in conf_choice()
729 for (child = menu->list; child; child = child->next) { in conf_choice()
736 if (child->sym == sym_get_choice_value(menu->sym)) in conf_choice()
757 show_help(menu); in conf_choice()
767 static void conf_string(struct menu *menu) in conf_string() argument
769 const char *prompt = menu_get_prompt(menu); in conf_string()
775 switch (sym_get_type(menu->sym)) { in conf_string()
791 sym_get_string_value(menu->sym)); in conf_string()
794 if (sym_set_string_value(menu->sym, dialog_input_result)) in conf_string()
799 show_help(menu); in conf_string()