Fred Drake avatar Fred Drake committed 9c32e92

Fix wrongly-named formal parameters in three places: begin_y was used twice
instead of begin_y and begin_x for derwin(), subpad(), and subwin().
Reported for derwin() by Eric Huss.

Added class annotations for the window methods so they would be properly
described in the index.

Comments (0)

Files changed (1)

Doc/lib/libcurses.tex

 \function{newwin()} above, have the
 following methods:
 
-\begin{methoddesc}{addch}{\optional{y, x,} ch\optional{, attr}}
+\begin{methoddesc}[window]{addch}{\optional{y, x,} ch\optional{, attr}}
 \strong{Note:} A \emph{character} means a C character (i.e., an
 \ASCII{} code), rather then a Python character (a string of length 1).
 (This note is true whenever the documentation mentions a character.)
 current settings for the window object.
 \end{methoddesc}
 
-\begin{methoddesc}{addnstr}{\optional{y, x,} str, n\optional{, attr}}
+\begin{methoddesc}[window]{addnstr}{\optional{y, x,} str, n\optional{, attr}}
 Paint at most \var{n} characters of the 
 string \var{str} at \code{(\var{y}, \var{x})} with attributes
 \var{attr}, overwriting anything previously on the display.
 \end{methoddesc}
 
-\begin{methoddesc}{addstr}{\optional{y, x,} str\optional{, attr}}
+\begin{methoddesc}[window]{addstr}{\optional{y, x,} str\optional{, attr}}
 Paint the string \var{str} at \code{(\var{y}, \var{x})} with attributes
 \var{attr}, overwriting anything previously on the display.
 \end{methoddesc}
 
-\begin{methoddesc}{attroff}{attr}
+\begin{methoddesc}[window]{attroff}{attr}
 Remove attribute \var{attr} from the ``background'' set applied to all
 writes to the current window.
 \end{methoddesc}
 
-\begin{methoddesc}{attron}{attr}
+\begin{methoddesc}[window]{attron}{attr}
 Add attribute \var{attr} from the ``background'' set applied to all
 writes to the current window.
 \end{methoddesc}
 
-\begin{methoddesc}{attrset}{attr}
+\begin{methoddesc}[window]{attrset}{attr}
 Set the ``background'' set of attributes to \var{attr}.  This set is
 initially 0 (no attributes).
 \end{methoddesc}
 
-\begin{methoddesc}{bkgd}{ch\optional{, attr}}
+\begin{methoddesc}[window]{bkgd}{ch\optional{, attr}}
 Sets the background property of the window to the character \var{ch},
 with attributes \var{attr}.  The change is then applied to every
 character position in that window:
 
 \end{methoddesc}
 
-\begin{methoddesc}{bkgdset}{ch\optional{, attr}}
+\begin{methoddesc}[window]{bkgdset}{ch\optional{, attr}}
 Sets the window's background.  A window's background consists of a
 character and any combination of attributes.  The attribute part of
 the background is combined (OR'ed) with all non-blank characters that
 operations.
 \end{methoddesc}
 
-\begin{methoddesc}{border}{\optional{ls\optional{, rs\optional{, ts\optional{,
-                           bs\optional{, tl\optional{, tr\optional{,
-                           bl\optional{, br}}}}}}}}}
+\begin{methoddesc}[window]{border}{\optional{ls\optional{, rs\optional{,
+                                   ts\optional{, bs\optional{, tl\optional{,
+                                   tr\optional{, bl\optional{, br}}}}}}}}}
 Draw a border around the edges of the window. Each parameter specifies 
 the character to use for a specific part of the border; see the table
 below for more details.  The characters must be specified as integers;
 \end{tableiii}
 \end{methoddesc}
 
-\begin{methoddesc}{box}{\optional{vertch, horch}}
+\begin{methoddesc}[window]{box}{\optional{vertch, horch}}
 Similar to \method{border()}, but both \var{ls} and \var{rs} are
 \var{vertch} and both \var{ts} and {bs} are \var{horch}.  The default
 corner characters are always used by this function.
 \end{methoddesc}
 
-\begin{methoddesc}{clear}{}
+\begin{methoddesc}[window]{clear}{}
 Like \method{erase()}, but also causes the whole window to be repainted
 upon next call to \method{refresh()}.
 \end{methoddesc}
 
-\begin{methoddesc}{clearok}{yes}
+\begin{methoddesc}[window]{clearok}{yes}
 If \var{yes} is 1, the next call to \method{refresh()}
 will clear the window completely.
 \end{methoddesc}
 
-\begin{methoddesc}{clrtobot}{}
+\begin{methoddesc}[window]{clrtobot}{}
 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.
 \end{methoddesc}
 
-\begin{methoddesc}{clrtoeol}{}
+\begin{methoddesc}[window]{clrtoeol}{}
 Erase from cursor to the end of the line.
 \end{methoddesc}
 
-\begin{methoddesc}{cursyncup}{}
+\begin{methoddesc}[window]{cursyncup}{}
 Updates the current cursor position of all the ancestors of the window
 to reflect the current cursor position of the window.
 \end{methoddesc}
 
-\begin{methoddesc}{delch}{\optional{x, y}}
+\begin{methoddesc}[window]{delch}{\optional{x, y}}
 Delete any character at \code{(\var{y}, \var{x})}.
 \end{methoddesc}
 
-\begin{methoddesc}{deleteln}{}
+\begin{methoddesc}[window]{deleteln}{}
 Delete the line under the cursor. All following lines are moved up
 by 1 line.
 \end{methoddesc}
 
-\begin{methoddesc}{derwin}{\optional{nlines, ncols,} begin_y, begin_y}
+\begin{methoddesc}[window]{derwin}{\optional{nlines, ncols,} begin_y, begin_x}
 An abbreviation for ``derive window'', \method{derwin()} is the same
 as calling \method{subwin()}, except that \var{begin_y} and
 \var{begin_x} are relative to the origin of the window, rather than
 derived window.
 \end{methoddesc}
 
-\begin{methoddesc}{echochar}{ch\optional{, attr}}
+\begin{methoddesc}[window]{echochar}{ch\optional{, attr}}
 Add character \var{ch} with attribute \var{attr}, and immediately 
 call \method{refresh()} on the window.
 \end{methoddesc}
 
-\begin{methoddesc}{enclose}{y, x}
+\begin{methoddesc}[window]{enclose}{y, x}
 Tests whether the given pair of screen-relative character-cell
 coordinates are enclosed by the given window, returning true or
 false.  It is useful for determining what subset of the screen
 windows enclose the location of a mouse event.
 \end{methoddesc}
 
-\begin{methoddesc}{erase}{}
+\begin{methoddesc}[window]{erase}{}
 Clear the window.
 \end{methoddesc}
 
-\begin{methoddesc}{getbegyx}{}
+\begin{methoddesc}[window]{getbegyx}{}
 Return a tuple \code{(\var{y}, \var{x})} of co-ordinates of upper-left
 corner.
 \end{methoddesc}
 
-\begin{methoddesc}{getch}{\optional{x, y}}
+\begin{methoddesc}[window]{getch}{\optional{x, y}}
 Get a character. Note that the integer returned does \emph{not} have to
 be in \ASCII{} range: function keys, keypad keys and so on return numbers
 higher than 256. In no-delay mode, an exception is raised if there is 
 no input.
 \end{methoddesc}
 
-\begin{methoddesc}{getkey}{\optional{x, y}}
+\begin{methoddesc}[window]{getkey}{\optional{x, y}}
 Get a character, returning a string instead of an integer, as
 \method{getch()} does. Function keys, keypad keys and so on return a
 multibyte string containing the key name.  In no-delay mode, an
 exception is raised if there is no input.
 \end{methoddesc}
 
-\begin{methoddesc}{getmaxyx}{}
+\begin{methoddesc}[window]{getmaxyx}{}
 Return a tuple \code{(\var{y}, \var{x})} of the height and width of
 the window.
 \end{methoddesc}
 
-\begin{methoddesc}{getparyx}{}
+\begin{methoddesc}[window]{getparyx}{}
 Returns the beginning coordinates of this window relative to its
 parent window into two integer variables y and x.  Returns
 \code{-1,-1} if this window has no parent.
 \end{methoddesc}
 
-\begin{methoddesc}{getstr}{\optional{x, y}}
+\begin{methoddesc}[window]{getstr}{\optional{x, y}}
 Read a string from the user, with primitive line editing capacity.
 \end{methoddesc}
 
-\begin{methoddesc}{getyx}{}
+\begin{methoddesc}[window]{getyx}{}
 Return a tuple \code{(\var{y}, \var{x})} of current cursor position 
 relative to the window's upper-left corner.
 \end{methoddesc}
 
-\begin{methoddesc}{hline}{\optional{y, x,} ch, n}
+\begin{methoddesc}[window]{hline}{\optional{y, x,} ch, n}
 Display a horizontal line starting at \code{(\var{y}, \var{x})} with
 length \var{n} consisting of the character \var{ch}.
 \end{methoddesc}
 
-\begin{methoddesc}{idcok}{flag}
+\begin{methoddesc}[window]{idcok}{flag}
 If \var{flag} is false, curses no longer considers using the hardware
 insert/delete character feature of the terminal; if \var{flag} is
 true, use of character insertion and deletion is enabled.  When curses
 default.
 \end{methoddesc}
 
-\begin{methoddesc}{idlok}{yes}
+\begin{methoddesc}[window]{idlok}{yes}
 If called with \var{yes} equal to 1, \module{curses} will try and use
 hardware line editing facilities. Otherwise, line insertion/deletion
 are disabled.
 \end{methoddesc}
 
-\begin{methoddesc}{immedok}{flag}
+\begin{methoddesc}[window]{immedok}{flag}
 If \var{flag} is true, any change in the window image
 automatically causes the window to be refreshed; you no longer
 have to call \method{refresh()} yourself.  However, it may
 wrefresh.  This option is disabled by default.
 \end{methoddesc}
 
-\begin{methoddesc}{inch}{\optional{x, y}}
+\begin{methoddesc}[window]{inch}{\optional{x, y}}
 Return the character at the given position in the window. The bottom
 8 bits are the character proper, and upper bits are the attributes.
 \end{methoddesc}
 
-\begin{methoddesc}{insch}{\optional{y, x,} ch\optional{, attr}}
+\begin{methoddesc}[window]{insch}{\optional{y, x,} ch\optional{, attr}}
 Paint character \var{ch} at \code{(\var{y}, \var{x})} with attributes
 \var{attr}, moving the line from position \var{x} right by one
 character.
 \end{methoddesc}
 
-\begin{methoddesc}{insdelln}{nlines}
+\begin{methoddesc}[window]{insdelln}{nlines}
 Inserts \var{nlines} lines into the specified window above the current
 line.  The \var{nlines} bottom lines are lost.  For negative
 \var{nlines}, delete \var{nlines} lines starting with the one under
 lines are cleared.  The current cursor position remains the same.
 \end{methoddesc}
 
-\begin{methoddesc}{insertln}{}
+\begin{methoddesc}[window]{insertln}{}
 Insert a blank line under the cursor. All following lines are moved
 down by 1 line.
 \end{methoddesc}
 
-\begin{methoddesc}{insnstr}{\optional{y, x, } str, n \optional{, attr}}
+\begin{methoddesc}[window]{insnstr}{\optional{y, x,} str, n \optional{, attr}}
 Insert a character string (as many characters as will fit on the line)
 before the character under the cursor, up to \var{n} characters.  
 If \var{n} is zero or negative,
 \var{y}, \var{x}, if specified). 
 \end{methoddesc}
 
-\begin{methoddesc}{insstr}{\optional{y, x, } str \optional{, attr}}
+\begin{methoddesc}[window]{insstr}{\optional{y, x, } str \optional{, attr}}
 Insert a character string (as many characters as will fit on the line)
 before the character under the cursor.  All characters to the right of
 the cursor are shifted right, with the the rightmost characters on the
 \var{y}, \var{x}, if specified). 
 \end{methoddesc}
 
-\begin{methoddesc}{instr}{\optional{y, x} \optional{, n}}
+\begin{methoddesc}[window]{instr}{\optional{y, x} \optional{, n}}
 Returns a string of characters, extracted from the window starting at
 the current cursor position, or at \var{y}, \var{x} if specified.
 Attributes are stripped from the characters.  If \var{n} is specified,
 long (exclusive of the trailing NUL).
 \end{methoddesc}
 
-\begin{methoddesc}{is_linetouched}{\var{line}}
+\begin{methoddesc}[window]{is_linetouched}{\var{line}}
 Returns true if the specified line was modified since the last call to
 \method{refresh()}; otherwise returns false.  Raises a
 \exception{curses.error} exception if \var{line} is not valid
 for the given window.
 \end{methoddesc}
 
-\begin{methoddesc}{is_wintouched}{}
+\begin{methoddesc}[window]{is_wintouched}{}
 Returns true if the specified window was modified since the last call to
 \method{refresh()}; otherwise returns false.
 \end{methoddesc}
 
-\begin{methoddesc}{keypad}{yes}
+\begin{methoddesc}[window]{keypad}{yes}
 If \var{yes} is 1, escape sequences generated by some keys (keypad, 
 function keys) will be interpreted by \module{curses}.
 If \var{yes} is 0, escape sequences will be left as is in the input
 stream.
 \end{methoddesc}
 
-\begin{methoddesc}{leaveok}{yes}
+\begin{methoddesc}[window]{leaveok}{yes}
 If \var{yes} is 1, cursor is left where it is on update, instead of
 being at ``cursor position.''  This reduces cursor movement where
 possible. If possible the cursor will be made invisible.
 an update.
 \end{methoddesc}
 
-\begin{methoddesc}{move}{new_y, new_x}
+\begin{methoddesc}[window]{move}{new_y, new_x}
 Move cursor to \code{(\var{new_y}, \var{new_x})}.
 \end{methoddesc}
 
-\begin{methoddesc}{mvderwin}{y, x}
+\begin{methoddesc}[window]{mvderwin}{y, x}
 Moves the window inside its parent window.  The screen-relative
 parameters of the window are not changed.  This routine is used to
 display different parts of the parent window at the same physical
 position on the screen.
 \end{methoddesc}
 
-\begin{methoddesc}{mvwin}{new_y, new_x}
+\begin{methoddesc}[window]{mvwin}{new_y, new_x}
 Move the window so its upper-left corner is at
 \code{(\var{new_y}, \var{new_x})}.
 \end{methoddesc}
 
-\begin{methoddesc}{nodelay}{yes}
+\begin{methoddesc}[window]{nodelay}{yes}
 If \var{yes} is \code{1}, \method{getch()} will be non-blocking.
 \end{methoddesc}
 
-\begin{methoddesc}{notimeout}{yes}
+\begin{methoddesc}[window]{notimeout}{yes}
 If \var{yes} is \code{1}, escape sequences will not be timed out.
 
 If \var{yes} is \code{0}, after a few milliseconds, an escape sequence
 will not be interpreted, and will be left in the input stream as is.
 \end{methoddesc}
 
-\begin{methoddesc}{noutrefresh}{}
+\begin{methoddesc}[window]{noutrefresh}{}
 Mark for refresh but wait.  This function updates the data structure
 representing the desired state of the window, but does not force
 an update of the physical screen.  To accomplish that, call 
 \function{doupdate()}.
 \end{methoddesc}
 
-\begin{methoddesc}{overlay}{destwin\optional{, sminrow, smincol,
-                            dminrow, dmincol, dmaxrow, dmaxcol}}
+\begin{methoddesc}[window]{overlay}{destwin\optional{, sminrow, smincol,
+                                    dminrow, dmincol, dmaxrow, dmaxcol}}
 Overlay the window on top of \var{destwin}. The windows need not be
 the same size, only the overlapping region is copied. This copy is
 non-destructive, which means that the current background character
 mark a rectangle in the destination window.
 \end{methoddesc}
 
-\begin{methoddesc}{overwrite}{destwin\optional{, sminrow, smincol,
-                              dminrow, dmincol, dmaxrow, dmaxcol}}
+\begin{methoddesc}[window]{overwrite}{destwin\optional{, sminrow, smincol,
+                                      dminrow, dmincol, dmaxrow, dmaxcol}}
 Overwrite the window on top of \var{destwin}. The windows need not be
 the same size, in which case only the overlapping region is
 copied. This copy is destructive, which means that the current
 mark a rectangle in the destination window.
 \end{methoddesc}
 
-\begin{methoddesc}{putwin}{file}
+\begin{methoddesc}[window]{putwin}{file}
 Writes all data associated with the window into the provided file
 object.  This information can be later retrieved using the
 \function{getwin()} function.
-
 \end{methoddesc}
 
-\begin{methoddesc}{redrawln}{beg, num}
+\begin{methoddesc}[window]{redrawln}{beg, num}
 Indicates that the \var{num} screen lines, starting at line \var{beg},
 are corrupted and should be completely redrawn on the next
 \method{refresh()} call.
 \end{methoddesc}
 
-\begin{methoddesc}{redrawwin}{}
+\begin{methoddesc}[window]{redrawwin}{}
 Touches the entire window, causing it to be completely redrawn on the
 next \method{refresh()} call.
 \end{methoddesc}
 
-\begin{methoddesc}{refresh}{\optional{pminrow, pmincol, sminrow,
-                                      smincol, smaxrow, smaxcol}}
+\begin{methoddesc}[window]{refresh}{\optional{pminrow, pmincol, sminrow,
+                                    smincol, smaxrow, smaxcol}}
 Update the display immediately (sync actual screen with previous
 drawing/deleting methods).
 
 \var{sminrow}, or \var{smincol} are treated as if they were zero.
 \end{methoddesc}
 
-\begin{methoddesc}{scroll}{\optional{lines\code{ = 1}}}
+\begin{methoddesc}[window]{scroll}{\optional{lines\code{ = 1}}}
 Scroll the screen or scrolling region upward by \var{lines} lines.
 \end{methoddesc}
 
-\begin{methoddesc}{scrollok}{flag}
+\begin{methoddesc}[window]{scrollok}{flag}
 Controls what happens when the cursor of a window is moved off the
 edge of the window or scrolling region, either as a result of a
 newline action on the bottom line, or typing the last character
 \method{idlok()}.
 \end{methoddesc}
 
-\begin{methoddesc}{setscrreg}{top, bottom}
+\begin{methoddesc}[window]{setscrreg}{top, bottom}
 Set the scrolling region from line \var{top} to line \var{bottom}. All
 scrolling actions will take place in this region.
 \end{methoddesc}
 
-\begin{methoddesc}{standend}{}
+\begin{methoddesc}[window]{standend}{}
 Turn off the standout attribute.  On some terminals this has the
 side effect of turning off all attributes.
 \end{methoddesc}
 
-\begin{methoddesc}{standout}{}
+\begin{methoddesc}[window]{standout}{}
 Turn on attribute \var{A_STANDOUT}.
 \end{methoddesc}
 
-\begin{methoddesc}{subpad}{\optional{nlines, ncols,} begin_y, begin_y}
+\begin{methoddesc}[window]{subpad}{\optional{nlines, ncols,} begin_y, begin_x}
 Return a sub-window, whose upper-left corner is at
 \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is
 \var{ncols}/\var{nlines}.
 \end{methoddesc}
 
-\begin{methoddesc}{subwin}{\optional{nlines, ncols,} begin_y, begin_y}
+\begin{methoddesc}[window]{subwin}{\optional{nlines, ncols,} begin_y, begin_x}
 Return a sub-window, whose upper-left corner is at
 \code{(\var{begin_y}, \var{begin_x})}, and whose width/height is
 \var{ncols}/\var{nlines}.
 specified position to the lower right corner of the window.
 \end{methoddesc}
 
-\begin{methoddesc}{syncdown}{}
+\begin{methoddesc}[window]{syncdown}{}
 Touches each location in the window that has been touched in any of
 its ancestor windows.  This routine is called by \method{refresh()},
 so it should almost never be necessary to call it manually.
 \end{methoddesc}
 
-\begin{methoddesc}{syncok}{flag}
+\begin{methoddesc}[window]{syncok}{flag}
 If called with \var{flag} set to true, then \method{syncup()} is
 called automatically whenever there is a change in the window.
 \end{methoddesc}
 
-\begin{methoddesc}{syncup}{}
+\begin{methoddesc}[window]{syncup}{}
 Touches all locations in ancestors of the window that have been changed in 
 the window.  
 \end{methoddesc}
 
-\begin{methoddesc}{timeout}{delay}
+\begin{methoddesc}[window]{timeout}{delay}
 Sets blocking or non-blocking read behavior for the window.  If
 \var{delay} is negative, blocking read is used, which will wait
 indefinitely for input).  If \var{delay} is zero, then non-blocking
 input at the end of that time.
 \end{methoddesc}
 
-\begin{methoddesc}{touchline}{start, count}
+\begin{methoddesc}[window]{touchline}{start, count}
 Pretend \var{count} lines have been changed, starting with line
 \var{start}.
 \end{methoddesc}
 
-\begin{methoddesc}{touchwin}{}
+\begin{methoddesc}[window]{touchwin}{}
 Pretend the whole window has been changed, for purposes of drawing
 optimizations.
 \end{methoddesc}
 
-\begin{methoddesc}{untouchwin}{}
+\begin{methoddesc}[window]{untouchwin}{}
 Marks all lines in  the  window  as unchanged since the last call to
 \method{refresh()}. 
 \end{methoddesc}
 
-\begin{methoddesc}{vline}{\optional{y, x,} ch, n}
+\begin{methoddesc}[window]{vline}{\optional{y, x,} ch, n}
 Display a vertical line starting at \code{(\var{y}, \var{x})} with
 length \var{n} consisting of the character \var{ch}.
 \end{methoddesc}
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.