Lines Matching +full:display +full:- +full:width +full:- +full:chars
1 // SPDX-License-Identifier: GPL-2.0+
148 init_pair(pair, color->fg, color->bg); in init_one_color()
149 if (color->hl) in init_one_color()
150 color->atr = A_BOLD | COLOR_PAIR(pair); in init_one_color()
152 color->atr = COLOR_PAIR(pair); in init_one_color()
185 * Setup for color display
202 void attr_clear(WINDOW * win, int height, int width, chtype attr) in attr_clear() argument
209 for (j = 0; j < width; j++) in attr_clear()
223 /* Display background title if it exists ... - SLH */ in dialog_clear()
231 for (pos = dlg.subtitles; pos != NULL; pos = pos->next) { in dialog_clear()
233 len += strlen(pos->text) + 3; in dialog_clear()
237 if (len > columns - 2) { in dialog_clear()
240 skip = len - (columns - 2 - strlen(ellipsis)); in dialog_clear()
243 for (pos = dlg.subtitles; pos != NULL; pos = pos->next) { in dialog_clear()
247 skip--; in dialog_clear()
252 skip--; in dialog_clear()
254 if (skip < strlen(pos->text)) { in dialog_clear()
255 waddstr(stdscr, pos->text + skip); in dialog_clear()
258 skip -= strlen(pos->text); in dialog_clear()
263 skip--; in dialog_clear()
266 for (i = len + 1; i < columns - 1; i++) in dialog_clear()
277 int height, width; in init_dialog() local
284 getmaxyx(stdscr, height, width); in init_dialog()
285 if (height < WINDOW_HEIGHT_MIN || width < WINDOW_WIDTH_MIN) { in init_dialog()
287 return -ERRDISPLAYTOOSMALL; in init_dialog()
323 * tile if wider than dialog (- 2 chars).
325 void print_title(WINDOW *dialog, const char *title, int width) in print_title() argument
328 int tlen = MIN(width - 2, strlen(title)); in print_title()
330 mvwaddch(dialog, 0, (width - tlen) / 2 - 1, ' '); in print_title()
331 mvwaddnstr(dialog, 0, (width - tlen)/2, title, tlen); in print_title()
340 * if there is no room for at least 4 nonblanks following a double-space.
342 void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x) in print_autowrap() argument
352 if (prompt_len <= width - x * 2) { /* If prompt is short */ in print_autowrap()
353 wmove(win, y, (width - prompt_len) / 2); in print_autowrap()
371 room = width - cur_x; in print_autowrap()
377 || wlen + 1 + (sp2 - sp) > room))) { in print_autowrap()
437 draw_box(WINDOW * win, int y, int x, int height, int width, in draw_box() argument
445 for (j = 0; j < width; j++) in draw_box()
448 else if (i == height - 1 && !j) in draw_box()
450 else if (!i && j == width - 1) in draw_box()
452 else if (i == height - 1 && j == width - 1) in draw_box()
456 else if (i == height - 1) in draw_box()
460 else if (j == width - 1) in draw_box()
471 void draw_shadow(WINDOW * win, int y, int x, int height, int width) in draw_shadow() argument
478 for (i = 0; i < width; i++) in draw_shadow()
481 wmove(win, i, x + width); in draw_shadow()
502 --in_paren; in first_alpha()
517 * keypad(FALSE) turn off ncurses support for escape sequences - and that's
540 return -1; in on_key_esc()
559 next = p->next; in item_reset()
572 item_cur->next = p; in item_make()
579 vsnprintf(item_cur->node.str, sizeof(item_cur->node.str), fmt, ap); in item_make()
588 avail = sizeof(item_cur->node.str) - strlen(item_cur->node.str); in item_add_str()
591 vsnprintf(item_cur->node.str + strlen(item_cur->node.str), in item_add_str()
593 item_cur->node.str[sizeof(item_cur->node.str) - 1] = '\0'; in item_add_str()
599 item_cur->node.tag = tag; in item_set_tag()
603 item_cur->node.data = ptr; in item_set_data()
608 item_cur->node.selected = val; in item_set_selected()
621 return item_cur->node.data; in item_data()
626 return item_cur->node.tag; in item_tag()
634 for (p = item_head; p; p = p->next) in item_count()
652 for (p = item_head; p; p = p->next) { in item_n()
662 return item_cur->node.str; in item_str()
667 return (item_cur->node.selected != 0); in item_is_selected()
672 return (item_cur->node.tag == tag); in item_is_tag()