]> ncurses.scripts.mit.edu Git - ncurses.git/blob - doc/html/man/menu_format.3x.html
ncurses 5.1
[ncurses.git] / doc / html / man / menu_format.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_format</B> - set and get menu sizes
9
10
11 </PRE>
12 <H2>SYNOPSIS</H2><PRE>
13        <B>#include</B> <B>&lt;menu.h&gt;</B>
14        int set_menu_format(MENU *menu, int rows, int cols);
15        int menu_format(const MENU *menu, int *rows, int *cols);
16
17
18 </PRE>
19 <H2>DESCRIPTION</H2><PRE>
20        The function <B>set_menu_format</B> sets the maximum display size
21        of the given menu.  If this size is too small  to  display
22        all  menu items, the menu will be made scrollable. If this
23        size is larger than the menus subwindow and the  subwindow
24        is  too  small to display all menu items, <B>post_menu()</B> will
25        fail.
26
27        The  default  format  is  16  rows,  1  column.    Calling
28        <B>set_menu_format</B>  with a null menu pointer will change this
29        default.  A zero row or column argument to <B>set_menu_format</B>
30        is  interpreted  as  a  request  not to change the current
31        value.
32
33        The function <B>menu_format</B>  returns  the  maximum-size  con-
34        straints  for the given menu into the storage addressed by
35        <B>rows</B> and <B>cols</B>.
36
37
38 </PRE>
39 <H2>RETURN VALUE</H2><PRE>
40        These routines returns one of the following:
41
42        <B>E_OK</B> The routine succeeded.
43
44        <B>E_SYSTEM_ERROR</B>
45             System error occurred (see <B>errno</B>).
46
47        <B>E_BAD_ARGUMENT</B>
48             Routine detected an incorrect or  out-of-range  argu-
49             ment.
50
51        <B>E_POSTED</B>
52             The menu is already posted.
53
54
55 </PRE>
56 <H2>SEE ALSO</H2><PRE>
57        <B><A HREF="ncurses.3x.html">curses(3x)</A></B>, <B><A HREF="menu.3x.html">menu(3x)</A></B>.
58
59
60 </PRE>
61 <H2>NOTES</H2><PRE>
62        The header file <B>&lt;menu.h&gt;</B> automatically includes the header
63        file <B>&lt;curses.h&gt;</B>.
64
65
66 </PRE>
67 <H2>PORTABILITY</H2><PRE>
68        These routines emulate the System V  menu  library.   They
69        were not supported on Version 7 or BSD versions.
70
71
72 </PRE>
73 <H2>AUTHORS</H2><PRE>
74        Juergen  Pfeifer.   Manual  pages  and  adaptation for new
75        curses by Eric S. Raymond.
76
77
78
79
80
81
82
83
84
85
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>