3 \fBerase\fR, \fBwerase\fR, \fBclear\fR,
4 \fBwclear\fR, \fBclrtobot\fR, \fBwclrtobot\fR, \fBclrtoeol\fR,
5 \fBwclrtoeol\fR - clear all or part of a \fBcurses\fR window
7 \fB# include <curses.h>\fR
11 \fBint werase(WINDOW *win);\fR
13 \fBint clear(void);\fR
15 \fBint wclear(WINDOW *win);\fR
17 \fBint clrtobot(void);\fR
19 \fBint wclrtobot(WINDOW *win);\fR
21 \fBint clrtoeol(void);\fR
23 \fBint wclrtoeol(WINDOW *win);\fR
26 The \fBerase\fR and \fBwerase\fR routines copy blanks to every
27 position in the window, clearing the screen.
29 The \fBclear\fR and \fBwclear\fR routines are like \fBerase\fR and
30 \fBwerase\fR, but they also call \fBclearok\fR, so that the screen is
31 cleared completely on the next call to \fBwrefresh\fR for that window
32 and repainted from scratch.
34 The \fBclrtobot\fR and \fBwclrtobot\fR routines erase from the cursor to the
35 end of screen. That is, they erase all lines below the cursor in the window.
36 Also, the current line to the right of the cursor, inclusive, is erased.
38 The \fBclrtoeol\fR and \fBwclrtoeol\fR routines erase the current line
39 to the right of the cursor, inclusive, to the end of the current line.
41 Blanks created by erasure have the current background rendition (as set
42 by \fBwbkgdset\fR) merged into them.
44 All routines return the integer \fBOK\fR. The SVr4.0 manual says "or a
45 non-negative integer if \fBimmedok\fR is set", but this appears to be an error.
47 Note that \fBerase\fR, \fBwerase\fR, \fBclear\fR, \fBwclear\fR,
48 \fBclrtobot\fR, and \fBclrtoeol\fR may be macros.
50 These functions are described in the XSI Curses standard, Issue 4. The
51 standard specifies that they return \fBERR\fR on failure, but specifies no
54 Some historic curses implementations had, as an undocumented feature, the
55 ability to do the equivalent of \fBclearok(..., 1)\fR by saying
56 \fBtouchwin(stdscr)\fR or \fBclear(stdscr)\fR. This will not work under
59 \fBcurses\fR(3X), \fBcurs_outopts\fR(3X), \fBcurs_refresh\fR(3X)
61 .\"# The following sets edit modes for GNU EMACS