Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!thumper!ulysses!andante!princeton!udel!rochester!bbn!uwmcsd1!marque!uunet!mcvax!philmds!leo From: leo@philmds.UUCP Newsgroups: comp.unix.questions Subject: Re: curses question Message-ID: <498@philmds.UUCP> Date: 9 Jun 88 06:10:41 GMT References: <440@wpg.UUCP> Reply-To: leo@philmds.UUCP (L.J.M. de Wit) Organization: Philips I&E DTS Eindhoven Lines: 30 In article <440@wpg.UUCP> russ@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.