Lines Matching +defs:string +defs:h
28 #include <curses.h>
29 #include <stdlib.h>
30 #include <string.h>
31 #include <unistd.h>
32 #include <wctype.h>
34 #include "bsddialog.h"
35 #include "bsddialog_theme.h"
36 #include "lib_util.h"
85 * update_box(conf, win, y, x, h, w, elev);
273 y = d->h - 2;
594 int maxrows, int mincols, bool increasecols, int *h, int *w)
671 *h = (tp->nword == 0) ? 0 : y;
799 set_widget_size(struct bsddialog_conf *conf, int rows, int cols, int *h, int *w)
807 *h = maxheight;
811 *h = MIN(rows, maxheight); /* rows is at most maxheight */
829 set_widget_autosize(struct bsddialog_conf *conf, int rows, int cols, int *h,
845 *h = widget_min_height(conf, htext, hnotext, bs->nbuttons > 0);
846 *h = MIN(*h, widget_max_height(conf));
857 int widget_checksize(int h, int w, struct buttons *bs, int hnotext, int minw)
864 if (h < minheight)
866 h, minheight);
881 set_widget_position(struct bsddialog_conf *conf, int *y, int *x, int h, int w)
887 *y = SCREENLINES/2 - (h + hshadow)/2;
890 if (*y + h + hshadow > SCREENLINES - (int)conf->auto_downmargin)
891 *y = SCREENLINES - h - hshadow - conf->auto_downmargin;
900 if (*y + h + hshadow > SCREENLINES)
923 if (set_widget_size(d->conf, d->rows, d->cols, &d->h, &d->w) != 0)
925 if (set_widget_autosize(d->conf, d->rows, d->cols, &d->h, &d->w,
928 if (widget_checksize(d->h, d->w, &d->bs, hnotext, minw) != 0)
930 if (set_widget_position(d->conf, &d->y, &d->x, d->h, d->w) != 0)
943 if ((clear = newwin(d->h, d->w, d->y, d->x)) == NULL)
984 int h, w;
1008 getmaxyx(win, h, w);
1020 mvwvline_set(win, 1, w-1, rs, h-2);
1021 mvwadd_wch(win, h-1, w-1, br);
1022 mvwhline_set(win, h-1, 1, bs, w-2);
1027 update_box(struct bsddialog_conf *conf, WINDOW *win, int y, int x, int h, int w,
1031 wresize(win, h, w);
1042 d->y + d->h - 1 - downnotext - BORDER,
1063 *d->conf->get_height = d->h;
1188 wchar_t *wtext, *string;
1193 if ((string = calloc(wcslen(wtext) + 1, sizeof(wchar_t))) == NULL)
1202 string[j] = wtext[i];
1204 if (wcschr(L"\n\t ", string[j]) != NULL || string[j] == L'\0') {
1205 string[j] = L'\0';
1206 print_string(pad, &rows, cols, &y, &x, string,
1248 free(string);
1270 wresize(d->shadow, d->h, d->w);
1276 wresize(d->widget, d->h, d->w);
1301 mvwadd_wch(d->widget, d->h-3, 0, <ee);
1302 mvwhline_set(d->widget, d->h-3, 1, &ts, d->w-2);
1306 mvwadd_wch(d->widget, d->h-3, d->w-1, &rtee);
1316 wmove(d->widget, d->h - 1, d->w/2 - wbottomtitle/2 - 1);