Lines Matching +full:data +full:- +full:width

2  *  textbox.c -- implements the text box
25 static void print_page(WINDOW *win, int height, int width, update_text_fn
26 update_text, void *data);
27 static void print_line(WINDOW *win, int row, int width);
41 void *data) in refresh_text_box() argument
43 print_page(box, boxh, boxw, update_text, data); in refresh_text_box()
53 * keys is a null-terminated array
58 update_text_fn update_text, void *data) in dialog_textbox() argument
61 int height, width, boxh, boxw; in dialog_textbox() local
82 getmaxyx(stdscr, height, width); in dialog_textbox()
83 if (height < TEXTBOX_HEIGTH_MIN || width < TEXTBOX_WIDTH_MIN) in dialog_textbox()
84 return -ERRDISPLAYTOOSMALL; in dialog_textbox()
89 height -= 4; in dialog_textbox()
93 width = initial_width; in dialog_textbox()
95 if (width > 5) in dialog_textbox()
96 width -= 5; in dialog_textbox()
98 width = 0; in dialog_textbox()
101 x = (getmaxx(stdscr) - width) / 2; in dialog_textbox()
102 y = (getmaxy(stdscr) - height) / 2; in dialog_textbox()
104 draw_shadow(stdscr, y, x, height, width); in dialog_textbox()
106 dialog = newwin(height, width, y, x); in dialog_textbox()
110 boxh = height - 4; in dialog_textbox()
111 boxw = width - 2; in dialog_textbox()
119 draw_box(dialog, 0, 0, height, width, in dialog_textbox()
123 mvwaddch(dialog, height - 3, 0, ACS_LTEE); in dialog_textbox()
124 for (i = 0; i < width - 2; i++) in dialog_textbox()
130 print_title(dialog, title, width); in dialog_textbox()
132 print_button(dialog, gettext(" Exit "), height - 2, width / 2 - 4, TRUE); in dialog_textbox()
139 data); in dialog_textbox()
159 data); in dialog_textbox()
170 cur_x, update_text, data); in dialog_textbox()
180 cur_x, update_text, data); in dialog_textbox()
190 cur_x, update_text, data); in dialog_textbox()
198 back_lines(page_length - 1); in dialog_textbox()
200 cur_x, update_text, data); in dialog_textbox()
210 cur_x, update_text, data); in dialog_textbox()
222 hscroll--; in dialog_textbox()
226 cur_x, update_text, data); in dialog_textbox()
237 cur_x, update_text, data); in dialog_textbox()
297 page--; in back_lines()
303 page--; in back_lines()
312 static void print_page(WINDOW *win, int height, int width, update_text_fn in print_page() argument
313 update_text, void *data) in print_page() argument
324 update_text(buf, page - buf, end - buf, data); in print_page()
329 print_line(win, i, width); in print_page()
341 static void print_line(WINDOW * win, int row, int width) in print_line() argument
349 waddnstr(win, line, MIN(strlen(line), width - 2)); in print_line()
356 for (i = 0; i < width - x; i++) in print_line()
405 percent = (page - buf) * 100 / strlen(buf); in print_position()
406 wmove(win, getmaxy(win) - 3, getmaxx(win) - 9); in print_position()