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

Hiding panels

Panels may be temporarily hidden. This means that they are removed from the panel deck, but the memory allocated to them is not released.

SYNOPSIS

   int hide_panel(panel)
   PANEL *panel;        /* Pointer to panel to be hidden */
Hidden panels are not refreshed to the screen, but you may nonetheless apply nearly all panel operations to them.


NOTE: Only the operations top_panel, bottom_panel, and hide_panel itself may not be applied to hidden panels because their panel arguments must belong to the deck of panels.

When you want to return a hidden panel to the deck of panels, you use the function show_panel described in the next section. When the panel is returned, it is placed on top of the deck.

To hide the panel pointed to by panel2 above, you write

   PANEL *panel2;
   

hide_panel(panel2);

Function hide_panel returns OK if the operation is successful and ERR if its panel pointer argument is NULL.

If you use function hide_panel wisely, your program's performance can increase. You can hide a panel temporarily if no portion of it is to be displayed for awhile. An example is the hiding of a pop-up message. Interim calls to function update_panels will then execute faster. More importantly, you do not incur the overhead of creating the pop-up message.

Checking if panels are hidden

To enable you to check if a given panel is hidden, ETI provides the following function.

SYNOPSIS

   int panel_hidden (panel)
   PANEL *panel;
Function panel_hidden returns a Boolean value (TRUE or FALSE) indicating whether or not its panel argument is hidden.

You might want to use this function before calling functions top_panel or bottom_panel, which do not operate on hidden panels. For example, to minimize the risk of having the error value ERR returned when moving a panel to the top of the deck, you can write

   PANEL *panel;
   

if (! panel_hidden (panel)) /* panel in deck ? */ top_panel (panel); /* move panel to top of deck */


Next topic: Reinstating panels
Previous topic: Making panels invisible

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