curses question

leo at philmds.UUCP leo at philmds.UUCP
Thu Jun 9 16:10:41 AEST 1988


In article <440 at wpg.UUCP> russ at wpg.UUCP (Russell Lawrence) writes:
>
>I'm working on an curses application that requires *lots* of windows.  
>The program must be able to clear specific windows from a user's 
>terminal WITHOUT overwriting the data in the particular WINDOW 
>structure.  This requirement rules out the use of werase() or wclear() 
>but also facilitates redisplaying the "erased" window.  
>
>Unless I missed something in the manuals, the curses library does not 
>include a function that would meet this need, so I decided to write my 
>own.  I figured I could get the specs for the physical location of a 
> ...[stuff deleted]...

You CAN do it using curses I think:
create a window with the same boundaries as your particular window
and uses this instead of the original.
So:
do updates on original window
use overwrite(org,new) to write it on the new window
use wrefresh(new) to copy to the screen
Now if you want to clear parts of the window, use
werase(new) and wrefresh(new),
use overwrite(org,new), wrefresh(new) to restore.

In fact you use the original as a backup, the new as the window you work
with. You could even use several dump levels 8-).

Hope this helps?

	Leo.



More information about the Comp.unix.questions mailing list