mirror of https://github.com/python/cpython.git
First round of curses documentation improvements; correct errors, flesh out
entry point descriptions.
This commit is contained in:
parent
46a733dfbf
commit
6899660a81
|
@ -1,8 +1,9 @@
|
||||||
\section{\module{curses} ---
|
\section{\module{curses} ---
|
||||||
Terminal independent console handling}
|
Screen painting and input handling for character-cell terminals}
|
||||||
|
|
||||||
\declaremodule{extension}{curses}
|
\declaremodule{extension}{curses}
|
||||||
\sectionauthor{Moshe Zadka}{mzadka@geocities.com}
|
\sectionauthor{Moshe Zadka}{mzadka@geocities.com}
|
||||||
|
\sectionauthor{Eric Raymond}{esr@thyrsus.com}
|
||||||
\modulesynopsis{An interface to the curses library.}
|
\modulesynopsis{An interface to the curses library.}
|
||||||
|
|
||||||
The \module{curses} module provides an interface to the curses \UNIX{}
|
The \module{curses} module provides an interface to the curses \UNIX{}
|
||||||
|
@ -10,14 +11,17 @@ library, the de-facto standard for portable advanced terminal
|
||||||
handling.
|
handling.
|
||||||
|
|
||||||
While curses is most widely used in the \UNIX{} environment, versions
|
While curses is most widely used in the \UNIX{} environment, versions
|
||||||
are available for DOS, OS/2, and possibly other systems as well. The
|
are available for DOS, OS/2, and possibly other systems as well. This
|
||||||
extension module has not been tested with all available versions of
|
extension module is designed to match the API of ncurses, an
|
||||||
curses.
|
open-source curses library hosted on Linux and the BSD variants of
|
||||||
|
Unix.
|
||||||
|
|
||||||
\begin{seealso}
|
\begin{seealso}
|
||||||
\seemodule{curses.ascii}{Utilities for working with \ASCII{}
|
\seemodule{curses.ascii}{Utilities for working with \ASCII{}
|
||||||
characters, regardless of your locale
|
characters, regardless of your locale
|
||||||
settings.}
|
settings.}
|
||||||
|
\seemodule{curses.textbox}{Editable text widget for curses supporting
|
||||||
|
Emacs-like bindings.}
|
||||||
\seetext{Tutorial material on using curses with Python is available
|
\seetext{Tutorial material on using curses with Python is available
|
||||||
on the Python Web site as Andrew Kuchling's
|
on the Python Web site as Andrew Kuchling's
|
||||||
\citetitle[http://www.python.org/doc/howto/curses/curses.html]{Curses
|
\citetitle[http://www.python.org/doc/howto/curses/curses.html]{Curses
|
||||||
|
@ -40,11 +44,15 @@ Whenever \var{attr} is optional, it defaults to \constant{A_NORMAL}.
|
||||||
The module \module{curses} defines the following functions:
|
The module \module{curses} defines the following functions:
|
||||||
|
|
||||||
\begin{funcdesc}{baudrate}{}
|
\begin{funcdesc}{baudrate}{}
|
||||||
Returns the output speed of the terminal in bits per second.
|
Returns the output speed of the terminal in bits per second. On
|
||||||
|
software terminal emulators it will have a fixed high value.
|
||||||
|
Included for historical reasons; in former times, it was used to
|
||||||
|
write output loops for time delays and occasionally to change
|
||||||
|
interfaces depending on the line speed.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{beep}{}
|
\begin{funcdesc}{beep}{}
|
||||||
Emit a short sound.
|
Emit a short attention sound.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{can_change_color}{}
|
\begin{funcdesc}{can_change_color}{}
|
||||||
|
@ -53,7 +61,12 @@ the colors displayed by the terminal.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{cbreak}{}
|
\begin{funcdesc}{cbreak}{}
|
||||||
Enter cbreak mode.
|
Enter cbreak mode. In cbreak mode (sometimes called ``rare'' mode)
|
||||||
|
normal tty line buffering is turned off and characters are available
|
||||||
|
to be read one by one. However, unlike raw mode, special characters
|
||||||
|
(interrupt, quit, suspend, and flow control) retain their effects on
|
||||||
|
the tty driver and calling program. Calling first \function{raw()}
|
||||||
|
then \function{cbreak()} leaves the terminal in cbreak mode.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{color_content}{color_number}
|
\begin{funcdesc}{color_content}{color_number}
|
||||||
|
@ -75,7 +88,8 @@ color. This attribute value can be combined with
|
||||||
Sets the cursor state. \var{visibility} can be set to 0, 1, or 2, for
|
Sets the cursor state. \var{visibility} can be set to 0, 1, or 2, for
|
||||||
invisible, normal, or very visible. If the terminal supports the
|
invisible, normal, or very visible. If the terminal supports the
|
||||||
visibility requested, the previous cursor state is returned;
|
visibility requested, the previous cursor state is returned;
|
||||||
otherwise, an exception is raised.
|
otherwise, an exception is raised. On many terminals, the ``visible''
|
||||||
|
mode is an underline cursor and the ``very visible'' mode is a block cursor.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{def_prog_mode}{}
|
\begin{funcdesc}{def_prog_mode}{}
|
||||||
|
@ -98,11 +112,24 @@ Inserts an \var{ms} millisecond pause in output.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{doupdate}{}
|
\begin{funcdesc}{doupdate}{}
|
||||||
Update the screen.
|
Update the physical screen. The curses library keeps two data
|
||||||
|
structures, one representing the current physical screen contents
|
||||||
|
and a virtual screen representing the desired next state. The
|
||||||
|
\function{doupdate()} ground updates the physical screen to match the
|
||||||
|
virtual screen.
|
||||||
|
|
||||||
|
The virtual screen may be updated by a \method{noutrefresh()} call
|
||||||
|
after write operations such as \method{addstr()} have been performed
|
||||||
|
on a window. The normal \method{refresh()} call is simply
|
||||||
|
\method{noutrefresh()} followed by \function{doupdate()}; if you have
|
||||||
|
to update multiple windows, you can speed performance and perhaps
|
||||||
|
reduce screen flicker by issuing \method{noutrefresh()} calls on
|
||||||
|
all windows, followed by a single \function{doupdate()}.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{echo}{}
|
\begin{funcdesc}{echo}{}
|
||||||
Enter echo mode.
|
Enter echo mode. In echo mode, each character input is echoed to the
|
||||||
|
screen as it is entered.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{endwin}{}
|
\begin{funcdesc}{endwin}{}
|
||||||
|
@ -110,24 +137,30 @@ De-initialize the library, and return terminal to normal status.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{erasechar}{}
|
\begin{funcdesc}{erasechar}{}
|
||||||
Returns the user's current erase character.
|
Returns the user's current erase character. Under Unix operating
|
||||||
|
systems this is a property of the controlling tty of the curses
|
||||||
|
program, and is not set by the curses library itself.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{filter}{}
|
\begin{funcdesc}{filter}{}
|
||||||
The \function{filter()} routine, if used, must be called before
|
The \function{filter()} routine, if used, must be called before
|
||||||
\function{initscr()} is called.
|
\function{initscr()} is called. The effect is that, during those
|
||||||
|
calls, LINES is set to 1; the capabilities clear, cup, cud, cud1,
|
||||||
The effect is that, during those calls, LINES is set to 1; the
|
cuu1, cuu, vpa are disabled; and the home string is set to the value of cr.
|
||||||
capabilities clear, cup, cud, cud1, cuu1, cuu, vpa are disabled; and
|
The effect is that the cursor is confined to the current line, and so
|
||||||
the home string is set to the value of cr.
|
are screen updates. This may be used for enabling cgaracter-at-a-time
|
||||||
|
line editing without touching the rest of the screen.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{flash}{}
|
\begin{funcdesc}{flash}{}
|
||||||
Flash the screen.
|
Flash the screen. That is, change it to reverse-video and then change
|
||||||
|
it back in a short interval. Some people prefer such as `visible bell'
|
||||||
|
to the audible attention signal produced by \function{beep()}.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{flushinp}{}
|
\begin{funcdesc}{flushinp}{}
|
||||||
Flush all input buffers.
|
Flush all input buffers. This throws away any typeahead that has
|
||||||
|
been typed by the user and has not yet been processed by the program.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{getmouse}{}
|
\begin{funcdesc}{getmouse}{}
|
||||||
|
@ -163,19 +196,21 @@ new window using that data, returning the new window object.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{has_colors}{}
|
\begin{funcdesc}{has_colors}{}
|
||||||
Returns true if the terminal can manipulate colors; otherwise, it
|
Returns true if the terminal can display colors; otherwise, it
|
||||||
returns false.
|
returns false.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{has_ic}{}
|
\begin{funcdesc}{has_ic}{}
|
||||||
Returns true if the terminal has insert- and delete- character
|
Returns true if the terminal has insert- and delete- character
|
||||||
capabilities.
|
capabilities. This function is included for historical reasons only,
|
||||||
|
as all modern software terminal emulators have such capabilities.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{has_il}{}
|
\begin{funcdesc}{has_il}{}
|
||||||
Returns true if the terminal has insert- and
|
Returns true if the terminal has insert- and
|
||||||
delete-line capabilities, or can simulate them using
|
delete-line capabilities, or can simulate them using
|
||||||
scrolling regions.
|
scrolling regions. This function is included for historical reasons only,
|
||||||
|
as all modern software terminal emulators have such capabilities.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{has_key}{ch}
|
\begin{funcdesc}{has_key}{ch}
|
||||||
|
@ -188,7 +223,7 @@ Used for half-delay mode, which is similar to cbreak mode in that
|
||||||
characters typed by the user are immediately available to the program.
|
characters typed by the user are immediately available to the program.
|
||||||
However, after blocking for \var{tenths} tenths of seconds, an
|
However, after blocking for \var{tenths} tenths of seconds, an
|
||||||
exception is raised if nothing has been typed. The value of
|
exception is raised if nothing has been typed. The value of
|
||||||
\var{tenths} must be a number between 1 and 255. Use nocbreak to
|
\var{tenths} must be a number between 1 and 255. Use \function{nocbreak()} to
|
||||||
leave half-delay mode.
|
leave half-delay mode.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
|
@ -199,7 +234,8 @@ green, and blue components). The value of \var{color_number} must be
|
||||||
between 0 and COLORS. Each of \var{r}, \var{g}, \var{b}, must be a
|
between 0 and COLORS. Each of \var{r}, \var{g}, \var{b}, must be a
|
||||||
value between 0 and 1000. When \function{init_color()} is used, all
|
value between 0 and 1000. When \function{init_color()} is used, all
|
||||||
occurrences of that color on the screen immediately change to the new
|
occurrences of that color on the screen immediately change to the new
|
||||||
definition.
|
definition. This function is a no-op on most terminals; it is active
|
||||||
|
only if \function{can_change_color()} returns 1.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{init_pair}{pair_number, fg, bg}
|
\begin{funcdesc}{init_pair}{pair_number, fg, bg}
|
||||||
|
@ -219,26 +255,34 @@ the whole screen.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{isendwin}{}
|
\begin{funcdesc}{isendwin}{}
|
||||||
Returns true if \function{endwin()} has been called.
|
Returns true if \function{endwin()} has been called (that is, the
|
||||||
|
curses library has been deinitialized).
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{keyname}{k}
|
\begin{funcdesc}{keyname}{k}
|
||||||
Return the name of the key numbered \var{k}.
|
Return the name of the key numbered \var{k}. The name of a key
|
||||||
|
generating printable ASCII character is the key's character. The name
|
||||||
|
of a control-key combination is a two-character string consisting of a
|
||||||
|
caret followed by the corresponding printable ASCII character. The
|
||||||
|
name of an alt-key combination (128-255) is a string consisting of the
|
||||||
|
prefix `M-' followed by the name of the corresponding ASCII character.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{killchar}{}
|
\begin{funcdesc}{killchar}{}
|
||||||
Returns the user's current line kill character.
|
Returns the user's current line kill character. Under Unix operating
|
||||||
|
systems this is a property of the controlling tty of the curses
|
||||||
|
program, and is not set by the curses library itself.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{longname}{}
|
\begin{funcdesc}{longname}{}
|
||||||
Returns a string containing a verbose description of the current
|
Returns a string containing the terminfo long name field describing the current
|
||||||
terminal. The maximum length of a verbose description is 128
|
terminal. The maximum length of a verbose description is 128
|
||||||
characters. It is defined only after the call to
|
characters. It is defined only after the call to
|
||||||
\function{initscr()}.
|
\function{initscr()}.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{meta}{yes}
|
\begin{funcdesc}{meta}{yes}
|
||||||
If \var{yes} is 1, allow 8-bit characters. If \var{yes} is 0,
|
If \var{yes} is 1, allow 8-bit characters to be input. If \var{yes} is 0,
|
||||||
allow only 7-bit chars.
|
allow only 7-bit chars.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
|
@ -264,19 +308,18 @@ Creates and returns a pointer to a new pad data structure with the
|
||||||
given number of lines and columns. A pad is returned as a
|
given number of lines and columns. A pad is returned as a
|
||||||
window object.
|
window object.
|
||||||
|
|
||||||
A pad is like a window,
|
A pad is like a window, except that it is not restricted by the screen
|
||||||
except that it is not restricted by the screen size, and is not
|
size, and is not necessarily associated with a particular part of the
|
||||||
necessarily associated with a particular part of the screen.
|
screen. Pads can be used when a large window is needed, and only a
|
||||||
Pads can be used when a large window is needed, and only a part
|
part of the window will be on the screen at one time. Automatic
|
||||||
of the window will be on the screen at one time. Automatic
|
refreshes of pads (e.g., from scrolling or echoing of input) do not
|
||||||
refreshes of pads (e.g., from scrolling or echoing of
|
occur. The \method{refresh()} and \method{noutrefresh()} methods of a
|
||||||
input) do not occur. It is not legal to call wrefresh
|
pad require 6 arguments to specify the part of the pad to be
|
||||||
with a pad as an argument; the routines prefresh or
|
displayed and the location on the screen to be used for the display.
|
||||||
pnoutrefresh should be called instead. Note that these
|
The arguments are pminrow, pmincol, sminrow, smincol, smaxrow,
|
||||||
routines require additional parameters to specify the part of
|
smaxcol; the p arguments refer to the upper left corner of the the pad
|
||||||
the pad to be displayed and the location on the screen to be
|
region to be displayed and the s arguments define a clipping box on
|
||||||
used for the display.
|
the screen within which the pad region is to be displayed.
|
||||||
|
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{newwin}{\optional{nlines, ncols,} begin_y, begin_x}
|
\begin{funcdesc}{newwin}{\optional{nlines, ncols,} begin_y, begin_x}
|
||||||
|
@ -289,19 +332,27 @@ specified position to the lower right corner of the screen.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{nl}{}
|
\begin{funcdesc}{nl}{}
|
||||||
Enter nl mode.
|
Enter newline mode. This mode translates the return key into newline
|
||||||
|
on input, and translates newline into return and line-feed on output.
|
||||||
|
Newline mode is initially on.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{nocbreak}{}
|
\begin{funcdesc}{nocbreak}{}
|
||||||
Leave cbreak mode.
|
Leave cbreak mode. Return to normal ``cooked'' mode with line buffering.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{noecho}{}
|
\begin{funcdesc}{noecho}{}
|
||||||
Leave echo mode.
|
Leave echo mode. Echoing of input characters is turned off,
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{nonl}{}
|
\begin{funcdesc}{nonl}{}
|
||||||
Leave nl mode.
|
Leave newline mode. Disable translation of return into newline on
|
||||||
|
input, and disable low-level translation of newline into
|
||||||
|
newline/return on output (but this does not change the behavior of
|
||||||
|
addch('\n') which always does the equivalent of return and line feed
|
||||||
|
on the virtual screen). With translation off, curses can sometimes speed
|
||||||
|
up vertical motion a little; also, it will be able to detect the
|
||||||
|
return key on input
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{noqiflush}{}
|
\begin{funcdesc}{noqiflush}{}
|
||||||
|
@ -314,7 +365,7 @@ Leave nl mode.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{noraw}{}
|
\begin{funcdesc}{noraw}{}
|
||||||
Leave raw mode.
|
Leave raw mode. Return to normal ``cooked'' mode with line buffering.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{pair_content}{pair_number}
|
\begin{funcdesc}{pair_content}{pair_number}
|
||||||
|
@ -329,8 +380,9 @@ Returns the number of the color-pair set by the attribute value \var{attr}.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{putp}{string}
|
\begin{funcdesc}{putp}{string}
|
||||||
Equivalent to \code{tputs(str, 1, putchar)}. Note that the output of putp always
|
Equivalent to \code{tputs(str, 1, putchar)}; emits the value of a
|
||||||
goes to standard output.
|
specified terminfo capability for the current terminal. Note that the
|
||||||
|
output of putp always goes to standard output.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{qiflush}{ \optional{flag} }
|
\begin{funcdesc}{qiflush}{ \optional{flag} }
|
||||||
|
@ -341,7 +393,10 @@ read.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{raw}{}
|
\begin{funcdesc}{raw}{}
|
||||||
Enter raw mode.
|
Enter raw mode. In raw mode, normal line buffering and
|
||||||
|
processing of interrupt, quit, suspend, and flow control keys are
|
||||||
|
turned off; characters are presented to curses input functions one
|
||||||
|
by one.
|
||||||
\end{funcdesc}
|
\end{funcdesc}
|
||||||
|
|
||||||
\begin{funcdesc}{reset_prog_mode}{}
|
\begin{funcdesc}{reset_prog_mode}{}
|
||||||
|
@ -433,6 +488,7 @@ following methods:
|
||||||
\strong{Note:} A \emph{character} means a C character (i.e., an
|
\strong{Note:} A \emph{character} means a C character (i.e., an
|
||||||
\ASCII{} code), rather then a Python character (a string of length 1).
|
\ASCII{} code), rather then a Python character (a string of length 1).
|
||||||
(This note is true whenever the documentation mentions a character.)
|
(This note is true whenever the documentation mentions a character.)
|
||||||
|
The builtin \function{ord()} is handy for conveying strings to codes.
|
||||||
|
|
||||||
Paint character \var{ch} at \code{(\var{y}, \var{x})} with attributes
|
Paint character \var{ch} at \code{(\var{y}, \var{x})} with attributes
|
||||||
\var{attr}, overwriting any character previously painter at that
|
\var{attr}, overwriting any character previously painter at that
|
||||||
|
@ -452,15 +508,18 @@ Paint the string \var{str} at \code{(\var{y}, \var{x})} with attributes
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{attroff}{attr}
|
\begin{methoddesc}{attroff}{attr}
|
||||||
Turn off attribute \var{attr}.
|
Remove attribute \var{attr} from the ``background'' set applied to all
|
||||||
|
writes to the current window.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{attron}{attr}
|
\begin{methoddesc}{attron}{attr}
|
||||||
Turn on attribute \var{attr}.
|
Add attribute \var{attr} from the ``background'' set applied to all
|
||||||
|
writes to the current window.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{attrset}{attr}
|
\begin{methoddesc}{attrset}{attr}
|
||||||
Set the attributes to \var{attr}.
|
Set the ``background'' set of attributes to \var{attr}. This set is
|
||||||
|
initially 0 (no attributes).
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{bkgd}{ch\optional{, attr}}
|
\begin{methoddesc}{bkgd}{ch\optional{, attr}}
|
||||||
|
@ -520,17 +579,17 @@ corner characters are always used by this function.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{clear}{}
|
\begin{methoddesc}{clear}{}
|
||||||
Like \method{erase()}, but also causes the whole screen to be repainted
|
Like \method{erase()}, but also causes the whole window to be repainted
|
||||||
upon next call to \method{refresh()}.
|
upon next call to \method{refresh()}.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{clearok}{yes}
|
\begin{methoddesc}{clearok}{yes}
|
||||||
If \var{yes} is 1, the next call to \method{refresh()}
|
If \var{yes} is 1, the next call to \method{refresh()}
|
||||||
will clear the screen completely.
|
will clear the window completely.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{clrtobot}{}
|
\begin{methoddesc}{clrtobot}{}
|
||||||
Erase from cursor to the end of the screen: all lines below the cursor
|
Erase from cursor to the end of the window: all lines below the cursor
|
||||||
are deleted, and then the equivalent of \method{clrtoeol()} is performed.
|
are deleted, and then the equivalent of \method{clrtoeol()} is performed.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
|
@ -562,7 +621,7 @@ derived window.
|
||||||
|
|
||||||
\begin{methoddesc}{echochar}{ch\optional{, attr}}
|
\begin{methoddesc}{echochar}{ch\optional{, attr}}
|
||||||
Add character \var{ch} with attribute \var{attr}, and immediately
|
Add character \var{ch} with attribute \var{attr}, and immediately
|
||||||
call \method{refresh}.
|
call \method{refresh} on the window.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{enclose}{y, x}
|
\begin{methoddesc}{enclose}{y, x}
|
||||||
|
@ -611,7 +670,8 @@ Read a string from the user, with primitive line editing capacity.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{getyx}{}
|
\begin{methoddesc}{getyx}{}
|
||||||
Return a tuple \code{(\var{y}, \var{x})} of current cursor position.
|
Return a tuple \code{(\var{y}, \var{x})} of current cursor position
|
||||||
|
relative to the window's upper-left corner.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{hline}{\optional{y, x,} ch, n}
|
\begin{methoddesc}{hline}{\optional{y, x,} ch, n}
|
||||||
|
@ -712,13 +772,12 @@ stream.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{leaveok}{yes}
|
\begin{methoddesc}{leaveok}{yes}
|
||||||
If \var{yes} is 1,
|
If \var{yes} is 1, cursor is left where it is on update, instead of
|
||||||
cursor is left where it is, instead of being at ``cursor position.''
|
being at ``cursor position.'' This reduces cursor movement where
|
||||||
This reduces cursor movement where possible. If possible it will be made
|
possible. If possible the cursor will be made invisible.
|
||||||
invisible.
|
|
||||||
|
|
||||||
If \var{yes} is 0, cursor will always be at
|
If \var{yes} is 0, cursor will always be at ``cursor position'' after
|
||||||
``cursor position'' after an update.
|
an update.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{move}{new_y, new_x}
|
\begin{methoddesc}{move}{new_y, new_x}
|
||||||
|
@ -807,7 +866,8 @@ scrolling actions will take place in this region.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{standend}{}
|
\begin{methoddesc}{standend}{}
|
||||||
Turn off all attributes.
|
Turn off the standout attribute. On some terminals this has the
|
||||||
|
side effect of turning off all attributes.
|
||||||
\end{methoddesc}
|
\end{methoddesc}
|
||||||
|
|
||||||
\begin{methoddesc}{standout}{}
|
\begin{methoddesc}{standout}{}
|
||||||
|
@ -1004,34 +1064,35 @@ been called.
|
||||||
|
|
||||||
\begin{tableii}{c|l}{code}{ACS code}{Meaning}
|
\begin{tableii}{c|l}{code}{ACS code}{Meaning}
|
||||||
\lineii{ACS_BBSS}{}
|
\lineii{ACS_BBSS}{}
|
||||||
\lineii{ACS_BLOCK}{}
|
\lineii{ACS_BLOCK}{solid square block}
|
||||||
\lineii{ACS_BOARD}{}
|
\lineii{ACS_BOARD}{board of squares}
|
||||||
\lineii{ACS_BSBS}{}
|
\lineii{ACS_BSBS}{}
|
||||||
\lineii{ACS_BSSB}{}
|
\lineii{ACS_BSSB}{}
|
||||||
\lineii{ACS_BSSS}{}
|
\lineii{ACS_BSSS}{}
|
||||||
\lineii{ACS_BTEE}{}
|
\lineii{ACS_BTEE}{bottom tee}
|
||||||
\lineii{ACS_BULLET}{}
|
\lineii{ACS_BULLET}{bullet}
|
||||||
\lineii{ACS_CKBOARD}{}
|
\lineii{ACS_CKBOARD}{checker board (stipple)}
|
||||||
\lineii{ACS_DARROW}{}
|
\lineii{ACS_DARROW}{arrow pointing down}
|
||||||
\lineii{ACS_DEGREE}{}
|
\lineii{ACS_DEGREE}{degree symbol}
|
||||||
\lineii{ACS_DIAMOND}{}
|
\lineii{ACS_DIAMOND}{diamond}
|
||||||
\lineii{ACS_GEQUAL}{ (Not available with SGI curses)}
|
\lineii{ACS_GEQUAL}{greater-than-or-equal-to}
|
||||||
\lineii{ACS_HLINE}{}
|
\lineii{ACS_HLINE}{horizontal line}
|
||||||
\lineii{ACS_LANTERN}{}
|
\lineii{ACS_LANTERN}{lantern symbol}
|
||||||
\lineii{ACS_LARROW}{}
|
\lineii{ACS_LARROW}{left arrow}
|
||||||
\lineii{ACS_LEQUAL}{ (Not available with SGI curses)}
|
\lineii{ACS_LEQUAL}{less-than-or-equal-to}
|
||||||
\lineii{ACS_LLCORNER}{}
|
\lineii{ACS_LLCORNER}{lower left-hand corner}
|
||||||
\lineii{ACS_LRCORNER}{}
|
\lineii{ACS_LRCORNER}{lower right-hand corner}
|
||||||
\lineii{ACS_LTEE}{}
|
\lineii{ACS_LTEE}{left tee}
|
||||||
\lineii{ACS_NEQUAL}{ (Not available with SGI curses)}
|
\lineii{ACS_NEQUAL}{not-equal sign}
|
||||||
\lineii{ACS_PI}{ (Not available with SGI curses)}
|
\lineii{ACS_PI}{letter pi}
|
||||||
\lineii{ACS_PLMINUS}{}
|
\lineii{ACS_PLMINUS}{plus-or-minus sign}
|
||||||
\lineii{ACS_PLUS}{}
|
\lineii{ACS_PLUS}{plus sign}
|
||||||
\lineii{ACS_RARROW}{}
|
\lineii{ACS_RARROW}{right arrow}
|
||||||
\lineii{ACS_RTEE}{}
|
\lineii{ACS_RTEE}{right tee}
|
||||||
\lineii{ACS_S1}{}
|
\lineii{ACS_S1}{scan line 1}
|
||||||
\lineii{ACS_S3}{ (Not available with SGI curses)}
|
\lineii{ACS_S3}{scan line 3}
|
||||||
\lineii{ACS_S9}{}
|
\lineii{ACS_S7}{scan line 7}
|
||||||
|
\lineii{ACS_S9}{scan line 9}
|
||||||
\lineii{ACS_SBBS}{}
|
\lineii{ACS_SBBS}{}
|
||||||
\lineii{ACS_SBSB}{}
|
\lineii{ACS_SBSB}{}
|
||||||
\lineii{ACS_SBSS}{}
|
\lineii{ACS_SBSS}{}
|
||||||
|
@ -1039,12 +1100,12 @@ been called.
|
||||||
\lineii{ACS_SSBS}{}
|
\lineii{ACS_SSBS}{}
|
||||||
\lineii{ACS_SSSB}{}
|
\lineii{ACS_SSSB}{}
|
||||||
\lineii{ACS_SSSS}{}
|
\lineii{ACS_SSSS}{}
|
||||||
\lineii{ACS_STERLING}{ (Not available with SGI curses)}
|
\lineii{ACS_STERLING}{pound sterling}
|
||||||
\lineii{ACS_TTEE}{}
|
\lineii{ACS_TTEE}{top tee}
|
||||||
\lineii{ACS_UARROW}{}
|
\lineii{ACS_UARROW}{up arrow}
|
||||||
\lineii{ACS_ULCORNER}{}
|
\lineii{ACS_ULCORNER}{upper left corner}
|
||||||
\lineii{ACS_URCORNER}{}
|
\lineii{ACS_URCORNER}{upper right corner}
|
||||||
\lineii{ACS_VLINE}{}
|
\lineii{ACS_VLINE}{vertical line}
|
||||||
\end{tableii}
|
\end{tableii}
|
||||||
|
|
||||||
The following table lists the predefined colors:
|
The following table lists the predefined colors:
|
||||||
|
|
Loading…
Reference in New Issue