Lines Matching defs:choice
89 #define print_item(index, choice, selected) \
92 do_print_item(menu, item_str(), choice, selected, !item_is_tag(':')); \
176 int key = 0, button = 0, scroll = 0, choice = 0;
234 /* Set choice to default item */
237 choice = item_n();
240 if ((scroll <= choice) && (scroll + max_choice > choice) &&
243 choice = choice - scroll;
247 if ((choice >= max_choice)) {
248 if (choice >= item_count() - max_choice / 2)
251 scroll = first_item = choice - max_choice / 2;
252 choice = choice - scroll;
257 print_item(first_item + i, i, i == choice);
266 wmove(menu, choice, item_x + 1);
278 for (i = choice + 1; i < max_choice; i++) {
299 print_item(scroll + choice, choice, FALSE);
302 if (choice < 2 && scroll) {
308 choice = MAX(choice - 1, 0);
311 print_item(scroll+choice, choice, FALSE);
313 if ((choice > max_choice - 3) &&
321 choice = MIN(choice + 1, max_choice - 1);
330 if (choice > 0)
331 choice--;
342 if (choice + 1 < max_choice)
343 choice++;
347 choice = i;
349 print_item(scroll + choice, choice, TRUE);
384 item_set(scroll + choice);