]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/menu_format.3x.html
ncurses 4.1
[ncurses.git] / Ada95 / html / menu_format.3x.html
1 <HTML>
2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
3 <PRE>
4        <STRONG>menu_format</STRONG> - set and get menu sizes
5
6
7 </PRE>
8 <H2>SYNOPSIS</H2><PRE>
9        <STRONG>#include</STRONG> <STRONG>&lt;menu.h&gt;</STRONG>
10        int set_menu_format(MENU *menu, int rows, int cols);
11        int menu_format(const MENU *menu, int *rows, int *cols);
12
13
14 </PRE>
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.
19
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
24        value.
25
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>.
29
30
31 </PRE>
32 <H2>RETURN VALUE</H2><PRE>
33        These routines returns one of the following:
34
35        <STRONG>E_OK</STRONG> The routine succeeded.
36
37        <STRONG>E_SYSTEM_ERROR</STRONG>
38             System error occurred (see <STRONG>errno</STRONG>).
39
40        <STRONG>E_BAD_ARGUMENT</STRONG>
41             Routine  detected  an incorrect or out-of-range argu-
42             ment.
43
44        <STRONG>E_POSTED</STRONG>
45             The menu is already posted.
46
47
48 </PRE>
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>.
51
52
53 </PRE>
54 <H2>NOTES</H2><PRE>
55        The header file <STRONG>&lt;menu.h&gt;</STRONG> automatically includes the header
56        file <STRONG>&lt;curses.h&gt;</STRONG>.
57
58
59 </PRE>
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.
63
64
65 </PRE>
66 <H2>AUTHORS</H2><PRE>
67        Juergen Pfeifer.  Manual  pages  and  adaptation  for  new
68        curses by Eric S. Raymond.
69
70 </PRE>
71 </BODY>
72 </HTML>