]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/menu_win.3x.html
ncurses 5.2
[ncurses.git] / doc / html / man / menu_win.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        <B>menu_win</B>  - make and break menu window and subwindow asso-
9        ciations
10
11
12 </PRE>
13 <H2>SYNOPSIS</H2><PRE>
14        <B>#include</B> <B>&lt;menu.h&gt;</B>
15        int set_menu_win(MENU *menu, WINDOW *win);
16        WINDOW *menu_win(const MENU *menu);
17        int set_menu_sub(MENU *menu, WINDOW *sub);
18        WINDOW *menu_sub(const MENU *menu);
19        int scale_menu(const MENU *menu, int *rows, int *columns);
20
21
22 </PRE>
23 <H2>DESCRIPTION</H2><PRE>
24        Every  menu has an associated pair of <B>curses</B> windows.  The
25        menu window displays any title and border associated  with
26        the  window;  the menu subwindow displays the items of the
27        menu that are currently available for selection.
28
29        The first four functions get and set those windows.  It is
30        not necessary to set either window; by default, the driver
31        code uses <B>stdscr</B> for both.
32
33        In the <B>set_</B> functions, window argument of <B>NULL</B> is  treated
34        as  though  it  were  <B>stsdcr</B>.   A menu argument of <B>NULL</B> is
35        treated as a request to change  the  system  default  menu
36        window or subwindow.
37
38        The  function <B>scale_menu</B> returns the minimum size required
39        for the subwindow of <I>menu</I>.
40
41
42 </PRE>
43 <H2>RETURN VALUE</H2><PRE>
44        Routines that return pointers return <B>NULL</B> on error.   Rou-
45        tines  that  return an integer return one of the following
46        error codes:
47
48        <B>E_OK</B> The routine succeeded.
49
50        <B>E_SYSTEM_ERROR</B>
51             System error occurred (see <B>errno</B>).
52
53        <B>E_BAD_ARGUMENT</B>
54             Routine detected an incorrect or  out-of-range  argu-
55             ment.
56
57        <B>E_POSTED</B>
58             The menu has already been posted.
59
60        <B>E_NOT_CONNECTED</B>
61             No items are connected to the menu.
62
63
64 </PRE>
65 <H2>SEE ALSO</H2><PRE>
66        <B><A HREF="ncurses.3x.html">curses(3x)</A></B>, <B><A HREF="menu.3x.html">menu(3x)</A></B>.
67
68
69
70 </PRE>
71 <H2>NOTES</H2><PRE>
72        The header file <B>&lt;menu.h&gt;</B> automatically includes the header
73        file <B>&lt;curses.h&gt;</B>.
74
75
76 </PRE>
77 <H2>PORTABILITY</H2><PRE>
78        These routines emulate the System V  menu  library.   They
79        were not supported on Version 7 or BSD versions.
80
81
82 </PRE>
83 <H2>AUTHORS</H2><PRE>
84        Juergen  Pfeifer.   Manual  pages  and  adaptation for new
85        curses by Eric S. Raymond.
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129 </PRE>
130 <HR>
131 <ADDRESS>
132 Man(1) output converted with
133 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>
134 </ADDRESS>
135 </BODY>
136 </HTML>