Linux Headquarters
[ Register ]
[ About us ] [ Home Page ]

[ Kernel ] [ Documentation ] [ Links ] [ Books ]
next up previous contents
Next: 8.10 Updating the Terminal Up: 8 Character Cell Graphics Previous: 8.8.3 Use Options

8.9 Clear Window and Lines

  • int erase()  
    int werase(win)  
    werase(...) and erase() will copy blanks to every position on the window win or . For instance, when you set color attributes to a window and call werase() the window would be colored. I had some problems with COLOR_PAIRS when I defined other attributes then black on white so I wrote my own erase function (this is a low level access to the WINDOW structure):

    The problem is, that ncurses sometimes makes no use of the window attributes when blanking the screen. For instance, in _clrtoeol.c, is BLANK defined as

    so that the other window attributes get lost while the line is erased.

  • int clear()  
    int wclear(win)  
    The same as erase(), but will also set clearok() (the screen will be cleared with the next refresh).
  • int clrtobot()  
    int wclrtobot(win)  
    Clearing the current cursor line (start is one character right from the cursor) and the line below the cursor.
  • int clrtoeol()  
    int wclrtoeol(win)  
    Clear the current line right from the cursor up to its end.


Converted on:
Fri Mar 29 14:43:04 EST 1996
Comments: webmaster (at) linuxhq.com.
Advertising: banners (at) linuxhq.com.
Compilation ©1998-2008 Linux Headquarters, Inc.