11-22-05 12:50 PM
Simon Elliott <Simon at ctsn.co.uk> wrote:
> I'm using curses and opening a new window with newwin() and closing it
> with delwin(). The only trouble is, when I call delwin(), the window's
> contents are still displayed on the screen.
For this case, you would touch the window that you want to redisplay.
The panel library does this in general, but touchwin/wrefresh work
for special cases.
> Is there any way of saving what would be under the new window, and
> restoring it after the new window is closed? The new window is always
> opened on top of the main stdscr window.
You can retrieve a window's contents line-by-line or character-by-character
using one of the insstr/innwstr/inchnstr or inch variants.
> I see in the man pages that there's a scr_dump() and scr_restore()
> which might do what I want. but these expect to use files, and I'd like
> to store the screen state in memory instead.
> --
> Simon Elliott http://www.ctsn.co.uk
--
Thomas E. Dickey
http://invisible-island.net
ftp://invisible-island.net
[ Post a follow-up to this message ]
|