4 <!-- Manpage converted by man2html 3.0.1 -->
8 panel - panel stack extension for curses
12 <H2>SYNOPSIS</H2><PRE>
13 <B>#include</B> <B><panel.h></B>
15 <B>cc</B> <B>[flags]</B> <B>sourcefiles</B> <B>-lpanel</B> <B>-lncurses</B>
17 <B>PANEL</B> <B>*new_panel(WINDOW</B> <B>*win)</B>
18 <B>int</B> <B>bottom_panel(PANEL</B> <B>*pan)</B>
19 <B>int</B> <B>top_panel(PANEL</B> <B>*pan)</B>
20 <B>int</B> <B>show_panel(PANEL</B> <B>*pan)</B>
21 <B>void</B> <B>update_panels();</B>
22 <B>int</B> <B>hide_panel(PANEL</B> <B>*pan)</B>
23 <B>WINDOW</B> <B>*panel_window(const</B> <B>PANEL</B> <B>*pan)</B>
24 <B>int</B> <B>replace_panel(PANEL</B> <B>*pan,</B> <B>WINDOW</B> <B>*window)</B>
25 <B>int</B> <B>move_panel(PANEL</B> <B>*pan,</B> <B>int</B> <B>starty,</B> <B>int</B> <B>startx)</B>
26 <B>int</B> <B>panel_hidden(const</B> <B>PANEL</B> <B>*pan)</B>
27 <B>PANEL</B> <B>*panel_above(const</B> <B>PANEL</B> <B>*pan)</B>
28 <B>PANEL</B> <B>*panel_below(const</B> <B>PANEL</B> <B>*pan)</B>
29 <B>int</B> <B>set_panel_userptr(PANEL</B> <B>*pan,</B> <B>const</B> <B>void</B> <B>*ptr)</B>
30 <B>const</B> <B>void</B> <B>*panel_userptr(const</B> <B>PANEL</B> <B>*pan)</B>
31 <B>int</B> <B>del_panel(PANEL</B> <B>*pan)</B>
35 <H2>DESCRIPTION</H2><PRE>
36 Panels are <B><A HREF="ncurses.3x.html">curses(3x)</A></B> windows with the added feature of
37 depth. Panel functions allow the use of stacked windows
38 and ensure the proper portions of each window and the
39 curses <B>stdscr</B> window are hidden or displayed when panels
40 are added, moved, modified or removed. The set of cur-
41 rently visible panels is the stack of panels. The <B>stdscr</B>
42 window is beneath all panels, and is not considered part
45 A window is associated with every panel. The panel rou-
46 tines enable you to create, move, hides, and show panels,
47 as well as position a panel at any desired location in the
50 Panel routines are a functional layer added to <B><A HREF="ncurses.3x.html">curses(3x)</A></B>,
51 make only high-level curses calls, and work anywhere ter-
56 <H2>FUNCTIONS</H2><PRE>
58 allocates a <B>PANEL</B> structure, associates it with
59 <B>win</B>, places the panel on the top of the stack
60 (causes it to be displayed above any other
61 panel) and returns a pointer to the new panel.
63 <B>void</B> <B>update_panels()</B>
64 refreshes the virtual screen to reflect the rela-
65 tions between the panels in the stack, but does not
66 call doupdate() to refresh the physical screen.
67 Use this function and not wrefresh or wnoutrefresh.
68 update_panels() may be called more than once before
69 a call to doupdate(), but doupdate() is the func-
70 tion responsible for updating the physical screen.
73 removes the given panel from the stack and deallo-
74 cates the <B>PANEL</B> structure (but not its associated
77 <B>hide_panel(pan)</B>
78 removes the given panel from the panel stack and
79 thus hides it from view. The <B>PANEL</B> structure is not
80 lost, merely removed from the stack.
82 <B>show_panel(pan)</B>
83 makes a hidden panel visible by placing it on top
84 of the panels in the panel stack. See COMPATIBILITY
88 puts the given visible panel on top of all panels
89 in the stack. See COMPATIBILITY below.
91 <B>bottom_panel(pan)</B>
92 puts panel at the bottom of all panels.
94 <B>move_panel(pan,starty,startx)</B>
95 moves the given panel window so that its upper-left
96 corner is at <B>starty</B>, <B>startx</B>. It does not change
97 the position of the panel in the stack. Be sure to
98 use this function, not <B>mvwin()</B>, to move a panel
101 <B>replace_panel(pan,window)</B>
102 replaces the current window of panel with <B>window</B>
103 (useful, for example if you want to resize a panel;
104 if you're using <B>ncurses</B>, you can call <B>replace_panel</B>
105 on the output of <B><A HREF="wresize.3x.html">wresize(3x)</A></B>). It does not change
106 the position of the panel in the stack.
108 <B>panel_above(pan)</B>
109 returns a pointer to the panel above pan. If the
110 panel argument is <B>(PANEL</B> <B>*)0</B>, it returns a pointer
111 to the bottom panel in the stack.
113 <B>panel_below(pan)</B>
114 returns a pointer to the panel just below pan. If
115 the panel argument is <B>(PANEL</B> <B>*)0</B>, it returns a
116 pointer to the top panel in the stack.
118 <B>set_panel_userptr(pan,ptr)</B>
119 sets the panel's user pointer.
121 <B>panel_userptr(pan)</B>
122 returns the user pointer for a given panel.
124 <B>panel_window(pan)</B>
125 returns a pointer to the window of the given panel.
129 <H2>DIAGNOSTICS</H2><PRE>
130 Each routine that returns a pointer returns <B>NULL</B> if an
131 error occurs. Each routine that returns an int value
132 returns <B>OK</B> if it executes successfully and <B>ERR</B> if not.
136 <H2>COMPATIBILITY</H2><PRE>
137 Reasonable care has been taken to ensure compatibility
138 with the native panel facility introduced in SVr3.2
139 (inspection of the SVr4 manual pages suggests the program-
140 ming interface is unchanged). The <B>PANEL</B> data structures
141 are merely similar. The programmer is cautioned not to
142 directly use <B>PANEL</B> fields.
144 The functions <B>show_panel()</B> and <B>top_panel()</B> are identical
145 in this implementation, and work equally well with dis-
146 played or hidden panels. In the native System V implemen-
147 tation, <B>show_panel()</B> is intended for making a hidden panel
148 visible (at the top of the stack) and <B>top_panel()</B> is
149 intended for making an already-visible panel move to the
150 top of the stack. You are cautioned to use the correct
151 function to ensure compatibility with native panel
157 In your library list, libpanel.a should be before libn-
158 curses.a; that is, you want to say `-lpanel -lncurses',
159 not the other way around (which would give you a link
160 error using GNU <B><A HREF="ld.1.html">ld(1)</A></B> and some other linkers).
165 panel.h interface for the panels library
167 libpanel.a the panels library itself
171 <H2>SEE ALSO</H2><PRE>
172 <B><A HREF="ncurses.3x.html">curses(3x)</A></B>
177 Originally written by Warren Tucker <wht@n4hgf.mt-
178 park.ga.us>, primarily to assist in porting u386mon to
179 systems without a native panels library. Repackaged for
180 ncurses by Zeyd ben-Halim.
190 Man(1) output converted with
191 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>