curses_intro.3x (2010 09)
c
curses_intro(3X) curses_intro(3X)
(X/Open CURSES)
— If scrolling is disabled, any characters that would extend beyond the last column of the last
line are truncated.
The
scrollok() function enables and disables scrolling.
Some
add functions move the cursor just beyond the end of the last character added. If this position is
beyond the end of a line, it causes wrapping and scrolling under the conditions specified in the second
bullet above.
Insertion
Insertion functions (such as
insch()) insert characters immediately before the character at the
specified or implied cursor position.
The insertion shifts all characters that were formerly at or beyond the cursor position on the cursor line
toward the end of that line. The disposition of the characters that would thus extend beyond the end of
the line depends on whether the function supports wrapping:
• If the function does not wrap, those characters are removed from the window. This may produce
orphaned columns.
• If the function supports wrapping, the effect is as described above in
truncation (except that the
overwriting discussed in the final dash is an insertion).
If multicolumn characters are displayed, some cursor positions are within a multicolumn character but
not at the beginning of a character. Any request to insert data at a position that is not the beginning of a
multicolumn character will be adjusted so that the actual cursor position is at the beginning of the mul-
ticolumn character in which the requested position occurs.
There are no warning indications relative to cursor relocation. The application should not maintain an
image of the cursor position, since this constitutes placing terminal-specific information in the application
and defeats the purpose of using Curses.
Portable applications cannot assume that a cursor position specified in an insert function is a reusable
indication of the actual cursor position.
Deletion
Deletion functions (such as
delch()) delete the simple or complex character at the specified or implied
cursor position, no matter which column of the character this is. All column positions are replaced by the
background character and rendition and the cursor is not relocated. If a character-deletion operation
would cause a previous wrapping operation to be undone, then the results are unspecified.
Window Operations
Overlapping a window (that is, placing one window on top of another) and overwriting a window (that is,
copying the contents of one window into another) follows the operation of overwriting multicolumn glyphs
around its edge. Any orphaned columns are handled as in the character operations.
Characters that Straddle the Subwindow Border
A subwindow can be defined such that multicolumn characters straddle the subwindow border. The char-
acter operations deal with these straddling characters as follows:
• Reading the subwindow with a function such as
in_wch() reads the entire straddling character.
• Adding, inserting or deleting in the subwindow deletes the entire straddling character before the
requested operation begins and does not relocate the cursor.
• Scrolling lines in the subwindow has the following effects:
— A straddling character at the start of the line is completely erased before the scroll operation
begins.
— A straddling character at the end of the line moves in the direction of the scroll and continues
to straddle the subwindow border. Column positions outside the subwindow at the straddling
character’s former position are orphaned unless another straddling character scrolls into those
positions.
If the application calls a function such as
border(), the above situations do not occur because writing
the border on the subwindow deletes any straddling characters.
In the above cases involving multicolumn characters, operations confined to a subwindow can modify the
screen outside the subwindow. Therefore, saving a subwindow, performing operations within the
8 Hewlett-Packard Company − 8 − HP-UX 11i Version 3: September 2010