]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/panel.3x.html
a07930d54334384ac64d2f95b58d28458a682de2
[ncurses.git] / doc / html / man / panel.3x.html
1 <HTML>
2 <BODY>
3 <PRE>
4 <!-- Manpage converted by man2html 3.0.1 -->
5
6 </PRE>
7 <H2>NAME</H2><PRE>
8        panel - panel stack extension for curses
9
10
11 </PRE>
12 <H2>SYNOPSIS</H2><PRE>
13        <B>#include</B> <B>&lt;panel.h&gt;</B>
14
15        <B>cc</B> <B>[flags]</B> <B>sourcefiles</B> <B>-lpanel</B> <B>-lncurses</B>
16
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>
32
33
34 </PRE>
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
43        of the stack.
44
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
48        stack.
49
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-
52        minfo curses does.
53
54
55 </PRE>
56 <H2>FUNCTIONS</H2><PRE>
57        <B>new_panel(win)</B>
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.
62
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.
71
72        <B>del_panel(pan)</B>
73               removes the given panel from the  stack and deallo-
74               cates the <B>PANEL</B> structure (but not  its  associated
75               window).
76
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.
81
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
85               below.
86
87        <B>top_panel(pan)</B>
88               puts  the  given visible panel on top of all panels
89               in the stack.  See COMPATIBILITY below.
90
91        <B>bottom_panel(pan)</B>
92               puts panel at the bottom of all panels.
93
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
99               window.
100
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.
107
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.
112
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.
117
118        <B>set_panel_userptr(pan,ptr)</B>
119               sets the panel's user pointer.
120
121        <B>panel_userptr(pan)</B>
122               returns the user pointer for a given panel.
123
124        <B>panel_window(pan)</B>
125               returns a pointer to the window of the given panel.
126
127
128 </PRE>
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.
133
134
135 </PRE>
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.
143
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
152        libraries.
153
154
155 </PRE>
156 <H2>NOTE</H2><PRE>
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).
161
162
163 </PRE>
164 <H2>FILES</H2><PRE>
165        panel.h interface for the panels library
166
167        libpanel.a the panels library itself
168
169
170 </PRE>
171 <H2>SEE ALSO</H2><PRE>
172        <B><A HREF="ncurses.3x.html">curses(3x)</A></B>
173
174
175 </PRE>
176 <H2>AUTHOR</H2><PRE>
177        Originally   written   by   Warren  Tucker  &lt;wht@n4hgf.mt-
178        park.ga.us&gt;, primarily to assist  in  porting  u386mon  to
179        systems  without  a native panels library.  Repackaged for
180        ncurses by Zeyd ben-Halim.
181
182
183
184
185
186
187 </PRE>
188 <HR>
189 <ADDRESS>
190 Man(1) output converted with
191 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
192 </ADDRESS>
193 </BODY>
194 </HTML>