Lines Matching refs:choice
66 static void do_print_item(WINDOW * win, const char *item, int choice, in do_print_item() argument
78 wmove(win, choice, 0); in do_print_item()
89 mvwaddstr(win, choice, item_x, menu_item); in do_print_item()
92 mvwaddch(win, choice, item_x + j, menu_item[j]); in do_print_item()
95 wmove(win, choice, item_x + 1); in do_print_item()
101 #define print_item(index, choice, selected) \ argument
104 do_print_item(menu, items[(index) * 2 + 1], choice, selected, hotkey); \
186 int key = 0, button = 0, scroll = 0, choice = 0; in dialog_menu() local
234 choice = i; in dialog_menu()
238 if ((fscanf(f, "%d\n", &scroll) == 1) && (scroll <= choice) && in dialog_menu()
239 (scroll + max_choice > choice) && (scroll >= 0) && in dialog_menu()
242 choice = choice - scroll; in dialog_menu()
251 if ((choice >= max_choice) || (f == NULL && choice >= max_choice / 2)) { in dialog_menu()
252 if (choice >= item_no - max_choice / 2) in dialog_menu()
255 scroll = first_item = choice - max_choice / 2; in dialog_menu()
256 choice = choice - scroll; in dialog_menu()
261 print_item(first_item + i, i, i == choice); in dialog_menu()
270 wmove(menu, choice, item_x + 1); in dialog_menu()
282 for (i = choice + 1; i < max_choice; i++) { in dialog_menu()
300 print_item(scroll + choice, choice, FALSE); in dialog_menu()
303 if (choice < 2 && scroll) { in dialog_menu()
309 choice = MAX(choice - 1, 0); in dialog_menu()
312 print_item(scroll+choice, choice, FALSE); in dialog_menu()
314 if ((choice > max_choice - 3) && in dialog_menu()
322 choice = MIN(choice + 1, max_choice - 1); in dialog_menu()
331 if (choice > 0) in dialog_menu()
332 choice--; in dialog_menu()
343 if (choice + 1 < max_choice) in dialog_menu()
344 choice++; in dialog_menu()
348 choice = i; in dialog_menu()
350 print_item(scroll + choice, choice, TRUE); in dialog_menu()
383 fprintf(stderr, "%s\n", items[(scroll + choice) * 2]); in dialog_menu()
406 items[(scroll + choice) * 2], in dialog_menu()
407 items[(scroll + choice) * 2 + 1] + in dialog_menu()
408 first_alpha(items [(scroll + choice) * 2 + 1], "")); in dialog_menu()
411 items[(scroll + choice) * 2]); in dialog_menu()