HP 9000 Series 300 Tutorials Manual page 215

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

Advertisement

Creating Windows
Additional windows can be created so that the applications program can
maintain several different screen images. Images can then be alternated under
program control as needs dictate. Windows can be useful in editors, games,
and other applications such as when handling interactive processes involving
multiple users on multiple terminals.
Overlapping windows can also be constructed so that changes to one window
are easily copied onto the overlapping area of the second. Several curses
routines have been provided specifically to handle such cases. overlay and
overwri te copy one window onto the second, each handling the copy operation
differently. wrefresh can be used to refresh the terminal screen, but in some
cases it is more efficient and pleasing to perform a series of internal window
operations that are equivalent to refresh, but which do not update the screen.
This is done by using a series of calls to wnoutrefresh (or its equivalent for
pads), followed by a single doupdat e that copies the series of refreshes onto the
physical screen in a single operation. This is readily provided because refresh
is really a call to wnoutrefresh followed by a call to doupdate.
To create a new window, use the function:
newwin
(lines, cols, begin_ row, begin_ col)
The newwin function call returns a pointer to the newly created window whose
dimensions are lines by cols, and whose upper left-hand corner is positioned at
screen location begin_ row and begin_ col.
Using Multiple Windows
All operations that affect stdscr have a corresponding function for use with
other named windows. These functions' names are formed by adding the letter
w in front of the stdscr function name. For example, the window function that
corresponds to addch is named:
waddch(mywin,
c)
Using Curses and Terminfo
1-17

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents