- scroll_hint(w->framesize, dir, dist, unit, start);
-}
-
-
-
-static void draw_wins(struct Win * w)
-{
- w->draw(w);
- uint16_t size_y = w->winmapsize.y;
- uint16_t 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);
- uint16_t y, 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(world.wins.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(w, '^', offset_y + 1);
- }
- if (size_y > offset_y + w->framesize.y)
- {
- winscroll_hint(w, 'v', size_y - ((offset_y + w->framesize.y) - 1));
- }
- if (offset_x > 0)
- {
- winscroll_hint(w, '<', offset_x + 1);
- }
- if (size_x > offset_x + w->framesize.x)
- {
- winscroll_hint(w, '>', size_x - ((offset_x + w->framesize.x) - 1));
- }
- if (0 != w->next)
- {
- return draw_wins(w->next);
- }