xref: /netbsd-src/lib/libpanel/panel.3 (revision ed8dd388368ba2a90492987cbff26238e7a4b6f1)
1.\"	$NetBSD: panel.3,v 1.3 2015/10/28 10:22:40 wiz Exp $
2.\"
3.\" Copyright (c) 2015 Valery Ushakov
4.\" All rights reserved.
5.\"
6.\" Redistribution and use in source and binary forms, with or without
7.\" modification, are permitted provided that the following conditions
8.\" are met:
9.\" 1. Redistributions of source code must retain the above copyright
10.\"    notice, this list of conditions and the following disclaimer.
11.\" 2. Redistributions in binary form must reproduce the above copyright
12.\"    notice, this list of conditions and the following disclaimer in the
13.\"    documentation and/or other materials provided with the distribution.
14.\"
15.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
16.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
17.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
18.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
19.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
20.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
21.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
22.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
23.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
24.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25.\"
26.Dd October 28, 2015
27.Dt PANEL 3
28.Os
29.Sh NAME
30.Nm panel
31.Nd z-order for curses windows
32.Sh LIBRARY
33.Lb libpanel
34.Sh SYNOPSIS
35.In panel.h
36.Sh DESCRIPTION
37Overlapping curses windows have no notion of z-order,
38what you see on the screen depends on the order of updates.
39The
40.Nm
41library is an extension built on top of
42.Xr curses 3
43that adds z-order to curses windows.
44.Pp
45Each panel has an associated curses window.
46All currently visible panels form a
47.Dq deck .
48Panels have z-order only relative to other panels in the deck and to
49.\".Xr stdscr 3 .
50stdscr.
51The latter doesn't have a panel of its own but implicitly lies below
52all other panels in the deck.
53If you mix plain curses windows and panels, the visual results are
54undefined since the panel library is not aware of windows that are not
55associated with panels.
56.Bl -column ".Xr set_panel_userptr 3"
57.It Sy "Function"          Ta Sy "Summary"
58.It Xr bottom_panel 3      Ta move the panel to the bottom of the deck
59.It Xr del_panel 3         Ta delete the panel
60.It Xr hide_panel 3        Ta hide the panel, removing it from deck
61.It Xr move_panel 3        Ta move the panel to a new position on screen
62.It Xr new_panel 3         Ta create new panel
63.It Xr panel_above 3       Ta a panel above the given panel
64.It Xr panel_below 3       Ta a panel below the given panel
65.It Xr panel_hidden 3      Ta check if the panel is hidden
66.It Xr panel_userptr 3     Ta user data associated with the panel
67.It Xr panel_window 3      Ta curses window associated with the panel
68.It Xr replace_panel 3     Ta associate a different window with the panel
69.It Xr set_panel_userptr 3 Ta associate arbitrary user data with the panel
70.It Xr show_panel 3        Ta show hidden panel at the top of the deck
71.It Xr top_panel 3         Ta move the panel to the top of the deck
72.It Xr update_panels 3     Ta update terminal display
73.El
74.Sh SEE ALSO
75.Xr curses 3
76