HP-UX Reference (11i v3 07/02) - 3 Library Functions A-M (vol 6)

c
curses_intro(3X) curses_intro(3X)
(X/Open CURSES)
Subwindows can be created from a parent window by calling
subwin(). The position and size of subwin-
dows on the screen must be identical to or totally within the parent window. Changes to either the parent
window or the subwindow affect both. Window clipping is not a property of subwindows.
Ancestors
The term ancestor refers to a window’s parent, or its parent, or so on.
Derived Windows
Derived windows are subwindows whose position is defined by reference to the parent window rather than
in absolute screen coordinates. Derived windows are otherwise no different from subwindows.
Pads
A pad is a specialised case of subwindow that is not necessarily associated with a viewable part of a screen.
Functions that deal with pads are all discussed in
newpad().
Ter minal
A terminal is the logical input and output device through which character-based applications interact with
the user.
TERMINAL is an opaque data type associated with a terminal. A TERMINAL data structure pri-
marily contains information about the capabilities of the terminal, as defined by terminfo.A
TERMI-
NAL
also contains information about the terminal modes and current state for input and output operations.
Each screen (see above) is associated with a TERMINAL.
Characters
Character Storage Size
Historically, a position on the screen has corresponded to a single stored byte. This correspondence is no
longer true for several reasons:
Some characters may occupy several columns when displayed on the screen (see Multicolumn Charac-
ters).
Some characters may be nonspacing characters, defined only in association with a spacing character
(see Nonspacing Characters (ENHANCED CURSES)).
The number of bytes to hold a character from the extended character sets depends on the
LC_CTYPE
locale category.
The internal storage format of characters and renditions is unspecified. There is no implied correspondence
between the internal storage format and the external representation of characters and renditions in objects
of type chtype and cchar_t.
Multicolumn Characters
Some character sets define multicolumn characters that occupy more than one column position when
displayed on the screen.
Writing a character whose width is greater than the width of the destination window is an error.
Attributes
Each character can be displayed with attributes such as underlining, reverse video or colour on terminals
that support such display enhancements. Current attributes of a window are applied to all characters that
are written into the window with waddch(), wadd_wch(), waddstr(), waddchstr() ,
waddwstr() , wadd_wchstr() and wprintw(). Attributes can be combined.
Attributes can be specified using constants with the A_ prefix specified in <curses.h> . The A_ con-
stants manipulate attributes in objects of type chtype. Additional attributes can be specified using con-
stants with the WA_ prefix. The WA_ constants manipulate attributes in objects of type attr_t.
Two constants that begin with A_ and WA_ and that represent the same terminal capability refer to the
same attribute in the terminfo database and in the window data structure. The effect on a window does
not differ depending on whether the application specifies A_ or WA_ constants. For example, when an
application updates window attributes using the interfaces that support the A_ values, a query of the win-
dow attribute using the function that returns WA_ values reflects this update. When it updates window
attributes using the interfaces that support the WA_ values, for which corresponding A_ values exist, a
query of the window attribute using the function that returns A_ values reflects this update.
250 Hewlett-Packard Company 5 HP-UX 11i Version 3: February 2007