HP-UX Reference (11i v1 00/12) - 3 Library Functions A-M (vol 6)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man3/!!!intro.3c
________________________________________________________________
___ ___
c
curses_intro(3X) curses_intro(3X)
(X/Open CURSES)
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 multi-column characters are displayed, some cursor positions are within a multi-column character but
not at the beginning of a character. Any request to insert data at a position that is not the beginning of a
multi-column character will be adjusted so that the actual cursor position is at the beginning of the multi-
column 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 multi-column 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 multi-column 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 charac-
ter.
• 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 opera-
tion begins.
— A straddling character at the end of the line moves in the direction of the scroll and contin-
ues 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 multi-column 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.
Special Characters
Some functions process special characters as specified below.
Section 3−−120 − 8 − HP-UX Release 11i: December 2000
___
___