Lines Matching defs:dialog

27 #include <dialog.h>
28 #include "dialog.priv.h"
39 * Display a dialog box with a list of options that can be turned on or off
50 WINDOW *dialog, *list;
126 /* center dialog box on screen */
134 dialog = newwin(height, width, y, x);
135 if (dialog == NULL) {
140 keypad(dialog, TRUE);
142 draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
143 wattrset(dialog, border_attr);
144 wmove(dialog, height - 3, 0);
145 waddch(dialog, ACS_LTEE);
147 waddch(dialog, ACS_HLINE);
148 wattrset(dialog, dialog_attr);
149 waddch(dialog, ACS_RTEE);
150 wmove(dialog, height - 2, 1);
152 waddch(dialog, ' ');
155 wattrset(dialog, title_attr);
156 wmove(dialog, 0, (width - strlen(title)) / 2 - 1);
157 waddch(dialog, ' ');
158 waddstr(dialog, title);
159 waddch(dialog, ' ');
161 wattrset(dialog, dialog_attr);
162 wmove(dialog, 1, 2);
163 print_autowrap(dialog, prompt, height - 1, width - 2, width, 1, 2, TRUE, FALSE);
166 getyx(dialog, cur_y, cur_x);
171 list = subwin(dialog, list_height, list_width, y + box_y + 1, x + box_x + 1);
173 delwin(dialog);
175 fprintf(stderr, "\nsubwin(dialog,%d,%d,%d,%d) failed, maybe wrong dims\n", list_height, list_width,
182 draw_box(dialog, box_y, box_x, list_height+2, list_width+2, menubox_border_attr, menubox_attr);
191 print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y);
193 display_helpline(dialog, height-1, width);
199 print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5,
202 print_button(dialog, ditems[OK_BUTTON].prompt, y, x,
207 print_button(dialog, "Cancel", y, x + 14, FALSE);
209 print_button(dialog, " OK ", y, x, TRUE);
211 wnoutrefresh(dialog);
216 key = wgetch(dialog);
281 print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5,
283 print_button(dialog, ditems[OK_BUTTON].prompt, y, x,
287 print_button(dialog, "Cancel", y, x + 14, button);
288 print_button(dialog, " OK ", y, x, !button);
292 wnoutrefresh(dialog);
301 getyx(dialog, cur_y, cur_x); /* Save cursor position */
313 print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y);
315 wnoutrefresh(dialog);
327 getyx(dialog, cur_y, cur_x); /* Save cursor position */
343 print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y);
345 wnoutrefresh(dialog);
389 delwin(dialog);
479 wmove(dialog, y, x + ok_space);
480 wrefresh(dialog);
496 print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5,
498 print_button(dialog, ditems[OK_BUTTON].prompt, y, x,
504 print_button(dialog, "Cancel", y, x + 14, button);
505 print_button(dialog, " OK ", y, x, !button);
510 wmove(dialog, y, x + cancel_space);
512 wmove(dialog, y, x + ok_space);
513 wrefresh(dialog);
564 print_arrows(dialog, scroll, list_height, item_no, box_x, box_y, check_x + 4, cur_x, cur_y);
568 print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5,
570 print_button(dialog, ditems[OK_BUTTON].prompt, y, x,
574 print_button(dialog, "Cancel", y, x + 14, button);
575 print_button(dialog, " OK ", y, x, !button);
577 wnoutrefresh(dialog);
591 delwin(dialog);