Next: , Previous: , Up: Curses Reference   [Contents][Index]


5.4 The curses panel library: (ncurses panel)

These are the functions in the (ncurses panel) module.

Panels are curses windows with the added feature of depth. Panel functions allow the use of stacked windows and ensure the proper portions of each window and the curses stdscr window are hidden or displayed when panels are added, moved, modified or removed. The set of currently visible panels is the stack of panels. The stdscr window is beneath all panels, and is not considered part of the stack.

A regular window may be converted to a panel window to enable the use of panel functions on it. The panel routines enable you to create, move, hide, and show panels, as well as position a panel at any desired location in the stack.

Panel routines are a functional layer added to curses, make only high-level curses calls, and work anywhere terminfo curses does.

Procedure: make-panel! win

This procedure converts a regular window win into a panel window. It places the panel on the top of the stack (causes it to be displayed above any other panel).

The return value is unspecified.

Procedure: panel? win

This procedure returns #t if win is a panel window, and it returns #f if it is a plain window or it is not a window.

Procedure: panel=? win1 win2

This procedure returns #t is win1 and win2 are the same panel window. It returns #f otherwise.

Procedure: update-panels

This procedure refreshes the virtual screen to reflect the relations between the panels in the stack, but does not call doupdate to refresh the physical screen. Use this function and not refresh or noutrefresh. update-panels may be called more than once before a call to doupdate, but doupdate is the procedure responsible for updating the physical screen.

Procedure: del-panel! pan

This procedure removes the panel property of a window and restores it to a standard window.

Procedure: hide-panel pan

This procedure removes the given panel from the panel stack and thus hides it from view. The panel pan is not lost, merely removed from the stack.

Procedure: panel-hidden? pan

This procedure returns #t if the panel is in the panel stack, #f if it is not.

Procedure: show-panel pan

This procedure makes a hidden panel visible by placing it on top of the panels in the panel stack.

Procedure: top-panel pan

This procedure puts the given visible panel on top of all panels in the stack.

Procedure: bottom-panel pan

This procedure puts the panel at the bottom of all panels.

Procedure: move-panel pan starty startx

This procedure moves the given panel window so that its upper-left corner is at starty, startx. It does not change the position of the panel in the stack. Be sure to use this function, not mvwin, to move a panel window.

Procedure: panels-map proc

Applies the procedure proc to all currently allocated #<panel>s. The panels are traversed in top-down order. The return values of proc are collected in a list. Note that both shown and hidden panels are traversed.

Procedure: panels-for-each proc

Applies the procedure proc to all currently allocated #<panel>s. The panels are traversed in top-down order. The return values of proc are discarded. Note that both shown and hidden panels are traversed. The return value is unspecified.


Next: , Previous: , Up: Curses Reference   [Contents][Index]