Next: , Previous: Function key labels library, 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 window is associated with every panel. 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: new-panel win

This procedure allocates a PANEL structure, associates it with win, places the panel on the top of the stack (causes it to be displayed above any other panel) and returns the new panel.

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 given panel from the stack and invalidates pan

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: replace-panel! pan window

This procedure replaces the current window of panel with window (useful, for example if you want to resize a panel; It does not change the position of the panel in the stack.

Procedure: panel-window panel

Returns the window of a given panel


Next: , Previous: Function key labels library, Up: Curses Reference   [Contents][Index]