2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
4 <STRONG>menu_format</STRONG> - set and get menu sizes
9 <STRONG>#include</STRONG> <STRONG><menu.h></STRONG>
10 int set_menu_format(MENU *menu, int rows, int cols);
11 int menu_format(const MENU *menu, int *rows, int *cols);
15 <H2>DESCRIPTION</H2><PRE>
16 The function <STRONG>set_menu_format</STRONG> sets the maximum display size
17 of the given window. If this size is too small to display
18 all menu items, the menu will be made scrollable.
20 The default format is 16 rows, 1 column. Calling
21 <STRONG>set_menu_format</STRONG> with a null menu pointer will change this
22 default. A zero row or column argument to <STRONG>set_menu_format</STRONG>
23 is interpreted as a request not to change the current
26 The function <STRONG>menu_format</STRONG> returns the maximum-size con-
27 straints for the given menu into the storage addressed by
28 <STRONG>rows</STRONG> and <STRONG>cols</STRONG>.
32 <H2>RETURN VALUE</H2><PRE>
33 These routines returns one of the following:
35 <STRONG>E_OK</STRONG> The routine succeeded.
37 <STRONG>E_SYSTEM_ERROR</STRONG>
38 System error occurred (see <STRONG>errno</STRONG>).
40 <STRONG>E_BAD_ARGUMENT</STRONG>
41 Routine detected an incorrect or out-of-range argu-
44 <STRONG>E_POSTED</STRONG>
45 The menu is already posted.
49 <H2>SEE ALSO</H2><PRE>
50 <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="menu.3x.html">menu(3X)</A></STRONG>.
55 The header file <STRONG><menu.h></STRONG> automatically includes the header
56 file <STRONG><curses.h></STRONG>.
60 <H2>PORTABILITY</H2><PRE>
61 These routines emulate the System V menu library. They
62 were not supported on Version 7 or BSD versions.
67 Juergen Pfeifer. Manual pages and adaptation for new
68 curses by Eric S. Raymond.