DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
ETI panels

Updating panels on the screen

Function update_panels makes all low-level curses calls (such as touchwin and wnoutrefresh) to update all panels so as to maintain proper depth relationships and to permit display only of the appropriate portions of panels.

SYNOPSIS

   void update_panels();
The function does not, however, actually refresh your terminal screen. To do that, you must make a call to doupdate whenever you want to display your latest changes.

To avoid displaying text on hidden panels, you should not use the low-level routines wnoutrefresh and wrefresh when working with panels.


CAUTION: In general, do not use the low-level routines wnoutrefresh or wrefresh to display a window associated with a panel. Instead, use function update_panels and function doupdate to display the entire deck of panels.

If you use the low-level routines wnoutrefresh or wrefresh for a window associated with a panel, it is not displayed properly unless it happens to be associated with the top panel in the deck or is not hidden at all by other panel windows.

Recall that panels are always above stdscr, the standard ETI window. When a panel is moved or deleted, stdscr is updated along with the visible panels to ensure that it appears beneath all panels. Although stdscr has depth relative to other panels, it is not a panel because panel operations like top_panel and bottom_panel do not apply. However, because stdscr rests beneath the deck of panels, you should always call update_panels when you work with panels and change stdscr, even if you do not change any panels themselves.

Function wgetch automatically calls wrefresh. Hence, if echo mode is active, when you request input from a window associated with a panel, be sure that the window is totally unobscured.

In summary, to update all panels and display them with their proper depth relationship, you write:

   WINDOW *win;
   

update_panels(); doupdate();

Note finally that there is no way to display the updates to an obscured panel without displaying the changes to all panels.


Next topic: Making panels invisible
Previous topic: Moving panels to the top or bottom of the deck

© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 27 April 2004