Lines Matching +full:display +full:- +full:height +full:- +full:chars
1 // SPDX-License-Identifier: GPL-2.0+
171 init_pair(pair, color->fg, color->bg); in init_one_color()
172 if (color->hl) in init_one_color()
173 color->atr = A_BOLD | COLOR_PAIR(pair); in init_one_color()
175 color->atr = COLOR_PAIR(pair); in init_one_color()
212 * Setup for color display
229 void attr_clear(WINDOW * win, int height, int width, chtype attr) in attr_clear() argument
234 for (i = 0; i < height; i++) { in attr_clear()
250 /* Display background title if it exists ... - SLH */ in dialog_clear()
258 for (pos = dlg.subtitles; pos != NULL; pos = pos->next) { in dialog_clear()
260 len += strlen(pos->text) + 3; in dialog_clear()
264 if (len > columns - 2) { in dialog_clear()
267 skip = len - (columns - 2 - strlen(ellipsis)); in dialog_clear()
270 for (pos = dlg.subtitles; pos != NULL; pos = pos->next) { in dialog_clear()
274 skip--; in dialog_clear()
279 skip--; in dialog_clear()
281 if (skip < strlen(pos->text)) { in dialog_clear()
282 waddstr(stdscr, pos->text + skip); in dialog_clear()
285 skip -= strlen(pos->text); in dialog_clear()
290 skip--; in dialog_clear()
293 for (i = len + 1; i < columns - 1; i++) in dialog_clear()
304 int height, width; in init_dialog() local
311 getmaxyx(stdscr, height, width); in init_dialog()
312 if (height < WINDOW_HEIGTH_MIN || width < WINDOW_WIDTH_MIN) { in init_dialog()
314 return -ERRDISPLAYTOOSMALL; in init_dialog()
350 * tile if wider than dialog (- 2 chars).
355 int tlen = MIN(width - 2, strlen(title)); in print_title()
357 mvwaddch(dialog, 0, (width - tlen) / 2 - 1, ' '); in print_title()
358 mvwaddnstr(dialog, 0, (width - tlen)/2, title, tlen); in print_title()
367 * if there is no room for at least 4 nonblanks following a double-space.
379 if (prompt_len <= width - x * 2) { /* If prompt is short */ in print_autowrap()
380 wmove(win, y, (width - prompt_len) / 2); in print_autowrap()
398 room = width - cur_x; in print_autowrap()
404 || wlen + 1 + (sp2 - sp) > room))) { in print_autowrap()
464 draw_box(WINDOW * win, int y, int x, int height, int width, in draw_box() argument
470 for (i = 0; i < height; i++) { in draw_box()
475 else if (i == height - 1 && !j) in draw_box()
477 else if (!i && j == width - 1) in draw_box()
479 else if (i == height - 1 && j == width - 1) in draw_box()
483 else if (i == height - 1) in draw_box()
487 else if (j == width - 1) in draw_box()
498 void draw_shadow(WINDOW * win, int y, int x, int height, int width) in draw_shadow() argument
504 wmove(win, y + height, x + 2); in draw_shadow()
507 for (i = y + 1; i < y + height + 1; i++) { in draw_shadow()
529 --in_paren; in first_alpha()
544 * keypad(FALSE) turn off ncurses support for escape sequences - and that's
567 return -1; in on_key_esc()
586 next = p->next; in item_reset()
599 item_cur->next = p; in item_make()
606 vsnprintf(item_cur->node.str, sizeof(item_cur->node.str), fmt, ap); in item_make()
615 avail = sizeof(item_cur->node.str) - strlen(item_cur->node.str); in item_add_str()
618 vsnprintf(item_cur->node.str + strlen(item_cur->node.str), in item_add_str()
620 item_cur->node.str[sizeof(item_cur->node.str) - 1] = '\0'; in item_add_str()
626 item_cur->node.tag = tag; in item_set_tag()
630 item_cur->node.data = ptr; in item_set_data()
635 item_cur->node.selected = val; in item_set_selected()
648 return item_cur->node.data; in item_data()
653 return item_cur->node.tag; in item_tag()
661 for (p = item_head; p; p = p->next) in item_count()
679 for (p = item_head; p; p = p->next) { in item_n()
689 return item_cur->node.str; in item_str()
694 return (item_cur->node.selected != 0); in item_is_selected()
699 return (item_cur->node.tag == tag); in item_is_tag()