Lines Matching +full:button +full:- +full:down

1 // SPDX-License-Identifier: GPL-2.0+
3 * menubox.c -- implements the menu box
12 * [ 1998-06-13 ]
14 * *) A bugfix for the Page-Down problem
16 * *) Formerly when I used Page Down and Page Up, the cursor would be set
22 * lxdialog is re-invoked by the Menuconfig shell script, can't
27 * one, but it would be nice if Menuconfig could make another "rm -f"
28 * just to be sure. Just try it out - you will recognise a difference!
30 * [ 1998-06-14 ]
32 * *) Now lxdialog is crash-safe against broken "lxdialog.scrltmp" files
42 * would leave mis-synchronized lxdialog.scrltmp files lying around,
59 strncpy(menu_item, item, menu_width - item_x); in do_print_item()
60 menu_item[menu_width - item_x] = '\0'; in do_print_item()
102 waddstr(win, "(-)"); in print_arrows()
136 int x = width / 2 - 28; in print_buttons()
137 int y = height - 2; in print_buttons()
168 int key = 0, button = 0, scroll = 0, choice = 0; in dialog_menu() local
176 return -ERRDISPLAYTOOSMALL; in dialog_menu()
178 height -= 4; in dialog_menu()
179 width -= 5; in dialog_menu()
180 menu_height = height - 10; in dialog_menu()
185 x = (getmaxx(stdscr) - width) / 2; in dialog_menu()
186 y = (getmaxy(stdscr) - height) / 2; in dialog_menu()
196 mvwaddch(dialog, height - 3, 0, ACS_LTEE); in dialog_menu()
197 for (i = 0; i < width - 2; i++) in dialog_menu()
206 print_autowrap(dialog, prompt, width - 2, 1, 3); in dialog_menu()
208 menu_width = width - 6; in dialog_menu()
209 box_y = height - menu_height - 5; in dialog_menu()
210 box_x = (width - menu_width) / 2 - 1; in dialog_menu()
222 item_x = (menu_width - 70) / 2; in dialog_menu()
235 choice = choice - scroll; in dialog_menu()
240 if (choice >= item_count() - max_choice / 2) in dialog_menu()
241 scroll = first_item = item_count() - max_choice; in dialog_menu()
243 scroll = first_item = choice - max_choice / 2; in dialog_menu()
244 choice = choice - scroll; in dialog_menu()
288 key == '-' || key == '+' || in dialog_menu()
293 if (key == KEY_UP || key == '-') { in dialog_menu()
295 /* Scroll menu down */ in dialog_menu()
296 do_scroll(menu, &scroll, -1); in dialog_menu()
300 choice = MAX(choice - 1, 0); in dialog_menu()
305 if ((choice > max_choice - 3) && in dialog_menu()
310 print_item(scroll+max_choice - 1, in dialog_menu()
311 max_choice - 1, FALSE); in dialog_menu()
313 choice = MIN(choice + 1, max_choice - 1); in dialog_menu()
319 do_scroll(menu, &scroll, -1); in dialog_menu()
323 choice--; in dialog_menu()
331 print_item(scroll+max_choice-1, in dialog_menu()
332 max_choice - 1, FALSE); in dialog_menu()
356 button = ((key == KEY_LEFT ? --button : ++button) < 0) in dialog_menu()
357 ? 4 : (button > 4 ? 0 : button); in dialog_menu()
359 print_buttons(dialog, height, width, button); in dialog_menu()
396 return button; in dialog_menu()