Lines Matching defs:dialog
9 #include "dialog.h"
16 static void print_buttons(WINDOW * dialog, int height, int width, int selected)
21 print_button(dialog, " Ok ", y, x, selected == 0);
22 print_button(dialog, " Help ", y, x + 14, selected == 1);
24 wmove(dialog, y, x + 1 + 14 * selected);
25 wrefresh(dialog);
29 * Display a dialog box for inputing a string
38 WINDOW *dialog;
51 /* center dialog box on screen */
57 dialog = newwin(height, width, y, x);
58 keypad(dialog, TRUE);
60 draw_box(dialog, 0, 0, height, width,
61 dlg.dialog.atr, dlg.border.atr);
62 wattrset(dialog, dlg.border.atr);
63 mvwaddch(dialog, height - 3, 0, ACS_LTEE);
65 waddch(dialog, ACS_HLINE);
66 wattrset(dialog, dlg.dialog.atr);
67 waddch(dialog, ACS_RTEE);
69 print_title(dialog, title, width);
71 wattrset(dialog, dlg.dialog.atr);
72 print_autowrap(dialog, prompt, width - 2, 1, 3);
76 getyx(dialog, y, x);
79 draw_box(dialog, y + 1, box_x - 1, 3, box_width + 2,
80 dlg.dialog.atr, dlg.border.atr);
82 print_buttons(dialog, height, width, 0);
85 wmove(dialog, box_y, box_x);
86 wattrset(dialog, dlg.inputbox.atr);
95 waddch(dialog, instr[show_x + i]);
99 waddstr(dialog, instr);
102 wmove(dialog, box_y, box_x + input_x);
104 wrefresh(dialog);
107 key = wgetch(dialog);
119 wattrset(dialog, dlg.inputbox.atr);
134 wmove(dialog, box_y, box_x);
137 waddch(dialog, ' ');
140 waddch(dialog, instr[show_x + i]);
142 wmove(dialog, box_y, input_x + box_x);
143 wrefresh(dialog);
149 wmove(dialog, box_y, --input_x + box_x);
152 wmove(dialog, box_y, box_x);
155 waddch(dialog, ' ');
158 waddch(dialog, instr[show_x + i]);
160 wmove(dialog, box_y, box_x);
168 wmove(dialog, box_y, ++input_x + box_x);
171 wmove(dialog, box_y, box_x);
174 waddch(dialog, ' ');
177 waddch(dialog, instr[show_x + i]);
179 wmove(dialog, box_y, input_x + box_x);
187 wattrset(dialog, dlg.inputbox.atr);
205 wmove(dialog, box_y, box_x);
208 waddch(dialog, ' ');
211 waddch(dialog, instr[show_x + i]);
213 wmove(dialog, box_y, input_x + box_x);
214 wrefresh(dialog);
224 delwin(dialog);
228 delwin(dialog);
235 print_buttons(dialog, height, width, 1);
239 print_buttons(dialog, height, width, 0);
240 wmove(dialog, box_y, box_x + input_x);
241 wrefresh(dialog);
245 print_buttons(dialog, height, width, 0);
255 print_buttons(dialog, height, width, 0);
259 print_buttons(dialog, height, width, 1);
263 print_buttons(dialog, height, width, 0);
264 wmove(dialog, box_y, box_x + input_x);
265 wrefresh(dialog);
271 delwin(dialog);
278 key = on_key_esc(dialog);
281 delwin(dialog);
287 delwin(dialog);