Lines Matching defs:dialog
22 #include "dialog.h"
28 print_buttons(WINDOW *dialog, int height, int width, int selected)
33 print_button (dialog, " Yes ", y, x, selected == 0);
34 print_button (dialog, " No ", y, x + 13, selected == 1);
36 wmove(dialog, y, x+1 + 13*selected );
37 wrefresh (dialog);
41 * Display a dialog box with two buttons - Yes and No
47 WINDOW *dialog;
49 /* center dialog box on screen */
55 dialog = newwin (height, width, y, x);
56 keypad (dialog, TRUE);
58 draw_box (dialog, 0, 0, height, width, dialog_attr, border_attr);
59 wattrset (dialog, border_attr);
60 mvwaddch (dialog, height-3, 0, ACS_LTEE);
62 waddch (dialog, ACS_HLINE);
63 wattrset (dialog, dialog_attr);
64 waddch (dialog, ACS_RTEE);
75 wattrset (dialog, title_attr);
76 mvwaddch (dialog, 0, (width - strlen(title))/2 - 1, ' ');
77 waddstr (dialog, (char *)title);
78 waddch (dialog, ' ');
81 wattrset (dialog, dialog_attr);
82 print_autowrap (dialog, prompt, width - 2, 1, 3);
84 print_buttons(dialog, height, width, 0);
87 key = wgetch (dialog);
91 delwin (dialog);
95 delwin (dialog);
104 print_buttons(dialog, height, width, button);
105 wrefresh (dialog);
109 delwin (dialog);
116 delwin (dialog);