Lines Matching defs:dialog

26 #include <dialog.h>
27 #include "dialog.priv.h"
45 WINDOW *dialog, *menu;
101 /* center dialog box on screen */
109 dialog = newwin(height, width, y, x);
110 if (dialog == NULL) {
115 keypad(dialog, TRUE);
117 draw_box(dialog, 0, 0, height, width, dialog_attr, border_attr);
118 wattrset(dialog, border_attr);
119 wmove(dialog, height - 3, 0);
120 waddch(dialog, ACS_LTEE);
122 waddch(dialog, ACS_HLINE);
123 wattrset(dialog, dialog_attr);
124 waddch(dialog, ACS_RTEE);
125 wmove(dialog, height - 2, 1);
127 waddch(dialog, ' ');
130 wattrset(dialog, title_attr);
131 wmove(dialog, 0, (width - strlen(title)) / 2 - 1);
132 waddch(dialog, ' ');
133 waddstr(dialog, title);
134 waddch(dialog, ' ');
136 wattrset(dialog, dialog_attr);
137 wmove(dialog, 1, 2);
138 print_autowrap(dialog, prompt, height - 1, width - 2, width, 1, 2, TRUE, FALSE);
141 getyx(dialog, cur_y, cur_x);
146 menu = subwin(dialog, menu_height, menu_width, y + box_y + 1, x + box_x + 1);
148 delwin(dialog);
150 fprintf(stderr, "\nsubwin(dialog,%d,%d,%d,%d) failed, maybe wrong dims\n", menu_height, menu_width,
157 draw_box(dialog, box_y, box_x, menu_height+2, menu_width+2, menubox_border_attr, menubox_attr);
166 print_arrows(dialog, scroll, menu_height, item_no, box_x, box_y, tag_x, cur_x, cur_y);
168 display_helpline(dialog, height - 1, width);
175 print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5, ditems[CANCEL_BUTTON].checked ? ditems[CANCEL_BUTTON].checked(&ditems[CANCEL_BUTTON]) : FALSE);
177 print_button(dialog, ditems[OK_BUTTON].prompt, y, x, ditems[OK_BUTTON].checked ? ditems[OK_BUTTON].checked(&ditems[OK_BUTTON]) : TRUE);
181 print_button(dialog, "Cancel", y, x + 14, FALSE);
183 print_button(dialog, " OK ", y, x, TRUE);
186 wrefresh(dialog);
188 key = wgetch(dialog);
244 getyx(dialog, cur_y, cur_x); /* Save cursor position */
255 print_arrows(dialog, scroll, menu_height, item_no, box_x, box_y, tag_x, cur_x, cur_y);
256 wrefresh(dialog);
267 getyx(dialog, cur_y, cur_x); /* Save cursor position */
282 print_arrows(dialog, scroll, menu_height, item_no, box_x, box_y, tag_x, cur_x, cur_y);
283 wrefresh(dialog);
293 getyx(dialog, cur_y, cur_x); /* Save cursor position */
300 wmove(dialog, cur_y, cur_x); /* Restore cursor to previous position */
301 wrefresh(dialog);
347 print_button(dialog, ditems[CANCEL_BUTTON].prompt, y, x + strlen(ditems[OK_BUTTON].prompt) + 5, ditems[CANCEL_BUTTON].checked ? ditems[CANCEL_BUTTON].checked(&ditems[CANCEL_BUTTON]) : button);
348 print_button(dialog, ditems[OK_BUTTON].prompt, y, x, ditems[OK_BUTTON].checked ? ditems[OK_BUTTON].checked(&ditems[OK_BUTTON]) : !button);
353 print_button(dialog, "Cancel", y, x + 14, button);
354 print_button(dialog, " OK ", y, x, !button);
359 wmove(dialog, y, x+cancel_space);
361 wmove(dialog, y, x+ok_space);
362 wrefresh(dialog);
392 delwin(dialog);
426 getyx(dialog, cur_y, cur_x); /* Save cursor position */
427 print_arrows(dialog, scroll, menu_height, item_no, box_x, box_y, tag_x, cur_x, cur_y);
428 wmove(dialog, cur_y, cur_x); /* Restore cursor to previous position */
429 wrefresh(dialog);
434 delwin(dialog);