#<panel> object is a window that is implicitly treated as
part of a deck including all other panel objects. The deck is treated
as a stack with the top panel being completely visible and the other
panels may or may not be obscured according to their positions. So the
basic idea is to create a stack of overlapping panels and use panels
library to display them correctly. There is a function similar to
refresh which, when called , displays panels in the correct
order. Functions are provided to hide or show panels, move panels,
change its size etc.. The overlapping problem is managed by the panels
library during all the calls to these functions.
The general flow of a panel program goes like this:
newwin) to be attached to the panels.
new-panelis used to create panels.
update-panelsto write the panels to the virtual screen in correct visibility order. Do a
doupdateto show it on the screen.
move-paneletc. Make use of helper functions like
del-panelto delete the panel.
Let’s make the concepts clear, with some programs. The following is a simple program which creates 3 overlapping panels and shows them on the screen.