Lines Matching defs:dialog
22 #include "dialog.h"
27 static void print_buttons(WINDOW * dialog, int height, int width, int selected)
32 print_button(dialog, " Yes ", y, x, selected == 0);
33 print_button(dialog, " No ", y, x + 13, selected == 1);
35 wmove(dialog, y, x + 1 + 13 * selected);
36 wrefresh(dialog);
40 * Display a dialog box with two buttons - Yes and No
45 WINDOW *dialog;
47 /* center dialog box on screen */
53 dialog = newwin(height, width, y, x);
54 keypad(dialog, TRUE);
56 draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
57 wattrset(dialog, border_attr);
58 mvwaddch(dialog, height - 3, 0, ACS_LTEE);
60 waddch(dialog, ACS_HLINE);
61 wattrset(dialog, dialog_attr);
62 waddch(dialog, ACS_RTEE);
64 print_title(dialog, title, width);
66 wattrset(dialog, dialog_attr);
67 print_autowrap(dialog, prompt, width - 2, 1, 3);
69 print_buttons(dialog, height, width, 0);
72 key = wgetch(dialog);
76 delwin(dialog);
80 delwin(dialog);
88 print_buttons(dialog, height, width, button);
89 wrefresh(dialog);
93 delwin(dialog);
100 delwin(dialog);