Lines Matching +full:button +full:-
1 // SPDX-License-Identifier: GPL-2.0+
3 * yesno.c -- implements the yes/no box
16 int x = width / 2 - 10; in print_buttons()
17 int y = height - 2; in print_buttons()
27 * Display a dialog box with two buttons - Yes and No
31 int i, x, y, key = 0, button = 0; in dialog_yesno() local
36 return -ERRDISPLAYTOOSMALL; in dialog_yesno()
38 return -ERRDISPLAYTOOSMALL; in dialog_yesno()
41 x = (getmaxx(stdscr) - width) / 2; in dialog_yesno()
42 y = (getmaxy(stdscr) - height) / 2; in dialog_yesno()
52 mvwaddch(dialog, height - 3, 0, ACS_LTEE); in dialog_yesno()
53 for (i = 0; i < width - 2; i++) in dialog_yesno()
61 print_autowrap(dialog, prompt, width - 2, 1, 3); in dialog_yesno()
80 button = ((key == KEY_LEFT ? --button : ++button) < 0) ? 1 : (button > 1 ? 0 : button); in dialog_yesno()
82 print_buttons(dialog, height, width, button); in dialog_yesno()
88 return button; in dialog_yesno()