4 <!-- Manpage converted by man2html 3.0.1 -->
8 <B>menu_format</B> - set and get menu sizes
12 <H2>SYNOPSIS</H2><PRE>
13 <B>#include</B> <B><menu.h></B>
14 int set_menu_format(MENU *menu, int rows, int cols);
15 int menu_format(const MENU *menu, int *rows, int *cols);
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
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
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>.
39 <H2>RETURN VALUE</H2><PRE>
40 These routines returns one of the following:
42 <B>E_OK</B> The routine succeeded.
45 System error occurred (see <B>errno</B>).
48 Routine detected an incorrect or out-of-range argu-
52 The menu is already posted.
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>.
62 The header file <B><menu.h></B> automatically includes the header
63 file <B><curses.h></B>.
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.
74 Juergen Pfeifer. Manual pages and adaptation for new
75 curses by Eric S. Raymond.
132 Man(1) output converted with
133 <a href="http://www.oac.uci.edu/indiv/ehood/man2html.html">man2html</a>