Ahhh curses, how thou hath plagued me.
I looked for quite a while, and I couldn't see a way. What happens in curses I believe is that when something is drawn, stuff stays over it until it is drawn over. Basically objects don't clean up after themselves, and they have no particular relation between screen real estate, and the internal objects that govern them (as would a real window-driven UI such as the Finder or Windows)
That being said, you can either output characters over it, using various text positioning commands available to you through the curses library or you can use clear() on the screen(check out man ncurses for the full set).
- clear($win) takes an object window created by Curses
#!/usr/bin/perl -w
use strict;
use Curses;
my $win = new Curses;
clear($win);
#$win->clear(); #may also work
- Check out mvwaddstr and mvwaddnstr if you're looking to blit out blank text where a widget would have been.
$win->addstr(12, 34, 'perlmonks forevah');
#or:
#$win->addstr(12, 34, ' ');
Good luck with it. I used to do tons of stuff with curses, but not so much anymore, and it was in C, but the libs/exports are the same as the man page, so that may be a good place to look.
--jb
| [reply] [d/l] [select] |
| [reply] |