+ struct yx_uint16 start = w->start;
+ scroll_hint(wm, &w->frame, dir, dist, unit, start);
+}
+
+
+
+static uint8_t draw_wins(struct WinMeta * wm, struct Win * w)
+{
+ if (ERR == wresize(w->frame.curses_win, 1, 1))
+ {
+ return 1;
+ }
+ w->draw(w);
+ uint16_t y, x, size_y, size_x;
+ getmaxyx(w->frame.curses_win, size_y, size_x);
+ uint16_t offset_y = center_offset(w->center.y, size_y, w->frame.size.y);
+ uint16_t offset_x = center_offset(w->center.x, size_x, w->frame.size.x);
+ for (y = offset_y; y < w->frame.size.y + offset_y && y < size_y; y++)
+ {
+ for (x = offset_x; x < w->frame.size.x + offset_x && x < size_x; x++)
+ {
+ chtype ch = mvwinch(w->frame.curses_win, y, x);
+ mvwaddch(wm->padframe.curses_win, w->start.y + (y - offset_y),
+ w->start.x + (x - offset_x), ch);
+ }
+ }
+ if (offset_y > 0)
+ {
+ winscroll_hint(wm, w, '^', offset_y + 1);
+ }
+ if (size_y > offset_y + w->frame.size.y)
+ {
+ winscroll_hint(wm, w, 'v', size_y - ((offset_y + w->frame.size.y) - 1));
+ }
+ if (offset_x > 0)
+ {
+ winscroll_hint(wm, w, '<', offset_x + 1);
+ }
+ if (size_x > offset_x + w->frame.size.x)
+ {
+ winscroll_hint(wm, w, '>', size_x - ((offset_x + w->frame.size.x) - 1));
+ }
+ if (0 != w->next)
+ {
+ return draw_wins(wm, w->next);
+ }
+ return 0;