+ struct yx_uint16 start = w->start;
+ scroll_hint(wm, w->framesize, dir, dist, unit, start);
+}
+
+
+
+static uint8_t draw_wins(struct WinMeta * wm, struct Win * w)
+{
+ w->draw(w);
+ uint16_t y, x, size_y, size_x;
+ size_y = w->winmapsize.y;
+ size_x = w->winmapsize.x;
+ uint16_t offset_y = center_offset(w->center.y, size_y, w->framesize.y);
+ uint16_t offset_x = center_offset(w->center.x, size_x, w->framesize.x);
+ for (y = offset_y; y < w->framesize.y + offset_y && y < size_y; y++)
+ {
+ for (x = offset_x; x < w->framesize.x + offset_x && x < size_x; x++)
+ {
+ chtype ch = w->winmap[(y * w->winmapsize.x) + x];
+ mvwaddch(wm->pad, w->start.y + (y - offset_y),
+ w->start.x + (x - offset_x), ch);
+ }
+ }
+ free(w->winmap);
+ w->winmap = NULL;
+ w->winmapsize.y = 0;
+ w->winmapsize.x = 0;
+ if (offset_y > 0)
+ {
+ winscroll_hint(wm, w, '^', offset_y + 1);
+ }
+ if (size_y > offset_y + w->framesize.y)
+ {
+ winscroll_hint(wm, w, 'v', size_y - ((offset_y + w->framesize.y) - 1));
+ }
+ if (offset_x > 0)
+ {
+ winscroll_hint(wm, w, '<', offset_x + 1);
+ }
+ if (size_x > offset_x + w->framesize.x)
+ {
+ winscroll_hint(wm, w, '>', size_x - ((offset_x + w->framesize.x) - 1));
+ }
+ if (0 != w->next)
+ {
+ return draw_wins(wm, w->next);
+ }
+ return 0;