curses.panel A panel stack extension for curses
Panels are windows with the added feature of depth, so they can be stacked on top of each other, and only the visible portions of each window will be displayed. Panels can be added, moved up or down in the stack, and removed.
Functions
The module curses.panel defines the following exception:
- exception curses.panel.error
Exception raised when a curses panel library function returns an error.
The module curses.panel defines the following functions:
- curses.panel.new_panel(win)
Returns a panel object, associating it with the given window win and placing the new panel on top of the panel stack. Be aware that you need to keep the returned panel object referenced explicitly. If you dont, the panel object is garbage collected and removed from the panel stack.
- curses.panel.update_panels()
Updates the virtual screen after changes in the panel stack. This does not call
curses.doupdate(), so youll have to do this yourself.
Panel objects
- class curses.panel.panel
Panel objects, as returned by
new_panel()above, are windows with a stacking order. Theres always a window associated with a panel which determines the content, while the panel methods are responsible for the windows depth in the panel stack.Panel objects have the following methods:
Returns
Trueif the panel is hidden (not visible),Falseotherwise.
- panel.hide()
Hide the panel. This does not delete the object, it just makes the window on screen invisible.
- panel.set_userptr(obj)
Set the panels user pointer to obj. This is used to associate an arbitrary piece of data with the panel, and can be any Python object.