|
|
To replace a panel's pointer to a window with a pointer to another window, you call function replace_panel. After the call, the panel remains at the same level within the panel deck.
SYNOPSIS
int replace_panel (panel, window) PANEL panel; /* Panel with window to be replaced */ WINDOW window; /* New window pointer for panel */This function returns
OK
if the operation is successful.
If not, it returns
ERR and leaves the original
panel unchanged.
Operation replace_panel fails if the window pointer is
NULL
or there is insufficient memory.
To associate a panel with window win1 and later replace its window by win2, you can write the following:
WINDOW *win1, win2; PANEL *panel;panel = new_panel(win1);
/* intervening processing with win1 as panel window */
replace_panel(panel, win2); /* change window associated with panel to win2 */
Once you have created additional windows with the low-level function newwin, you in effect can reshape panel windows by using replace_panel. To do so leaves the contents of the two windows unchanged.