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 menu. If this size is too small to display
18 all menu items, the menu will be made scrollable. If this
19 size is larger than the menus subwindow and the subwindow
20 is too small to display all menu items, <STRONG>post_menu()</STRONG> will
23 The default format is 16 rows, 1 column. Calling
24 <STRONG>set_menu_format</STRONG> with a null menu pointer will change this
25 default. A zero row or column argument to <STRONG>set_menu_format</STRONG>
26 is interpreted as a request not to change the current
29 The function <STRONG>menu_format</STRONG> returns the maximum-size con-
30 straints for the given menu into the storage addressed by
31 <STRONG>rows</STRONG> and <STRONG>cols</STRONG>.
35 <H2>RETURN VALUE</H2><PRE>
36 These routines returns one of the following:
38 <STRONG>E_OK</STRONG> The routine succeeded.
40 <STRONG>E_SYSTEM_ERROR</STRONG>
41 System error occurred (see <STRONG>errno</STRONG>).
43 <STRONG>E_BAD_ARGUMENT</STRONG>
44 Routine detected an incorrect or out-of-range argu-
47 <STRONG>E_POSTED</STRONG>
48 The menu is already posted.
52 <H2>SEE ALSO</H2><PRE>
53 <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="menu.3x.html">menu(3X)</A></STRONG>.
58 The header file <STRONG><menu.h></STRONG> automatically includes the header
59 file <STRONG><curses.h></STRONG>.
63 <H2>PORTABILITY</H2><PRE>
64 These routines emulate the System V menu library. They
65 were not supported on Version 7 or BSD versions.