HP 9000 Series 300 Tutorials Manual page 216

Device i/o and user interfacing hp-ux concepts and tutorials
Hide thumbs Also See for HP 9000 Series 300:
Table of Contents
To update the contents of the currently displayed screen to match the contents
of a window, use:
wrefresh
(my win)
Whenever the boundaries of two or more windows overlap and thus conflict,
the most recently refreshed window becomes the currently displayed screen in
that area of the display area that is defined by the window size and location.
Any call to the non-w version of any window function (stdscr function calls) is
converted to its w-prefixed counterpart. Thus, a call to addch(c) produces a
call to waddch (stdscr.
c),
automatically adding the stdscr argument in the
process.
The example program window at the end of this tutorial shows how windowing
can be handled. The main display is kept in stdscr. When the user wants to
put something else on the screen, a new window is created that covers part
of the screen. A call to wrefresh on that window causes the window to be
written over stdscr on the display screen. A subsequent call to refresh
on stdscr causes the original window to be fully restored to the screen,
eliminating the temporarily displayed window.
Examine the touchwin calls in window that precede refresh calls on overlapping
windows. touchwin calls prevent optimization by curses, thus forcing
wrefresh to completely overwrite the entire window area on the physical
screen (previously displayed data is thus erased in the window area only). In
some situations, if the touchwin call is omitted, only part of the window is
written and existing information from a previous window may remain in the
newly written window area.
For improved screen addressability, a set of move functions are available in
conjunction with most common window functions. They produce a call to move
before the other function is called, so that the cursor can be relocated before
the window function is executed. Here are some examples:
• mvaddch(row,col,ch)
is equivalent to
move(row,col);
addch(ch)
• mvwaddch
(row, col, win, ch)
is equivalent to wmove (
win, row, col) ;
waddch (
win, ch) .
Refer to the curses routines section of this tutorial for more detailed
descriptions of the window routines and their related move functions.
1-18
Using Curses and Terminfo

Hide quick links:

Table of Contents
loading

This manual is also suitable for:

Hp 9000 series 800

Table of Contents