HP 9000 Series 300 Tutorials Manual page 217

Device i/o and user interfacing hp-ux concepts and tutorials
Hide thumbs Also See for HP 9000 Series 300:
Table of Contents

Advertisement

Subwindows
Subwindows can be created within any existing window or pad. Subwindows
are identical to normal windows except that the subwindow's character data
structure occupies the same memory locations as the corresponding character
positions in the main window. This means that whenever a character is placed
in a subwindow, the main window automatically contains the same character
in the same location with the same highlighting attributes. In fact, as a
result of shared character storage, any character stored in the character array
automatically receives the current attributes for the window or subwindow
through which it was stored, regardless of how many subwindows overlap the
storage location. This feature greatly simplifies combining windows in a single
display for some types of applications.
Each subwindow has its own cursor location, can be configured with a soft
scrolling region, and generally has the same capabilities as any normal window,
but, except for shared character storage, is completely independent of the
original window it is associated with. Because of shared character data
structures, curses does not allow deletion of any window (delwin
(win)
or pad
that has one or more undeleted subwindows.
If subwindows are created within a pad, care must be exercised in the choice
of correct refresh functions and other program characteristics to ensure correct
data handling.
Multiple Terminals
curses can produce simultaneous output on multiple terminals. This
capability is useful in single-process programs that access a common data
base such as multi-player games. Output to multiple terminals is a complex
issue, and curses does not solve all of the related programming problems.
For example, it is the program's responsibility to determine the special file
name for each terminal line and what type of terminal is connected to that
line. The normal method, checking the environment variable
$TERM,
does not
work because each process can only examine its own environment. Another
issue that must be addressed is the case of multiple programs reading data
from a single terminal line, a situation that produces race conditions which
Using Curses and Terminfo
1-19

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents