HP-UX Reference (11i v2 07/12) - 3 Library Functions A-M (vol 6)
c
curses_intro(3X) curses_intro(3X)
(X/Open CURSES)
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 mul-
ticolumn character will be adjusted so that the actual cursor position is at the beginning of the multicolumn
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 indi-
cation 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 charac-
ter 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 subwin-
dow, and then restoring the subwindow may disturb the appearance of the screen. To overcome these
effects (for example, for pop-up windows), the application should refresh the entire screen.
262 Hewlett-Packard Company − 8 − HP-UX 11i Version 2: December 2007 Update