]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/menu_format.3x.html
ncurses 4.2
[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 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
21        fail.
22
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
27        value.
28
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>.
32
33
34 </PRE>
35 <H2>RETURN VALUE</H2><PRE>
36        These routines returns one of the following:
37
38        <STRONG>E_OK</STRONG> The routine succeeded.
39
40        <STRONG>E_SYSTEM_ERROR</STRONG>
41             System error occurred (see <STRONG>errno</STRONG>).
42
43        <STRONG>E_BAD_ARGUMENT</STRONG>
44             Routine detected an incorrect or  out-of-range  argu-
45             ment.
46
47        <STRONG>E_POSTED</STRONG>
48             The menu is already posted.
49
50
51 </PRE>
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>.
54
55
56 </PRE>
57 <H2>NOTES</H2><PRE>
58        The header file <STRONG>&lt;menu.h&gt;</STRONG> automatically includes the header
59        file <STRONG>&lt;curses.h&gt;</STRONG>.
60
61
62 </PRE>
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.
66
67
68 </PRE>
69 <H2>AUTHORS</H2><PRE>
70
71
72
73
74
75
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 </PRE>
123 </BODY>
124 </HTML>