]> ncurses.scripts.mit.edu Git - ncurses.git/blob - Ada95/html/menu_win.3x.html
ncurses 4.1
[ncurses.git] / Ada95 / html / menu_win.3x.html
1 <HTML>
2 <BODY BGCOLOR="#99ccbb" TEXT="#000000" LINK="#4060b0" VLINK="#000080" ALINK="#ff4040">
3 <PRE>
4        <STRONG>menu_win</STRONG>  - make and break menu window and subwindow asso-
5        ciations
6
7
8 </PRE>
9 <H2>SYNOPSIS</H2><PRE>
10        <STRONG>#include</STRONG> <STRONG>&lt;menu.h&gt;</STRONG>
11        int set_menu_win(MENU *menu, WINDOW *win);
12        WINDOW *menu_win(const MENU *menu);
13        int set_menu_sub(MENU *menu, WINDOW *sub);
14        WINDOW *menu_sub(const MENU *menu);
15        int scale_menu(const MENU *menu, int *rows, int *columns);
16
17
18 </PRE>
19 <H2>DESCRIPTION</H2><PRE>
20        Every  menu has an associated pair of <STRONG>curses</STRONG> windows.  The
21        menu window displays any title and border associated  with
22        the  window;  the menu subwindow displays the items of the
23        menu that are currently available for selection.
24
25        The first four functions get and set those windows.  It is
26        not necessary to set either window; by default, the driver
27        code uses <STRONG>stdscr</STRONG> for both.
28
29        In the <STRONG>set_</STRONG> functions, window argument of <STRONG>NULL</STRONG> is  treated
30        as  though  it  were  <STRONG>stsdcr</STRONG>.   A menu argument of <STRONG>NULL</STRONG> is
31        treated as a request to change  the  system  default  menu
32        window or subwindow.
33
34        The  function <STRONG>scale_menu</STRONG> returns the minimum size required
35        for the subwindow of <EM>menu</EM>.
36
37
38 </PRE>
39 <H2>RETURN VALUE</H2><PRE>
40        Routines that return pointers return <STRONG>NULL</STRONG> on error.   Rou-
41        tines  that  return an integer return one of the following
42        error codes:
43
44        <STRONG>E_OK</STRONG> The routine succeeded.
45
46        <STRONG>E_SYSTEM_ERROR</STRONG>
47             System error occurred (see <STRONG>errno</STRONG>).
48
49        <STRONG>E_BAD_ARGUMENT</STRONG>
50             Routine detected an incorrect or  out-of-range  argu-
51             ment.
52
53        <STRONG>E_POSTED</STRONG>
54             The menu has already been posted.
55
56        <STRONG>E_NOT_CONNECTED</STRONG>
57             No items are connected to the menu.
58
59
60 </PRE>
61 <H2>SEE ALSO</H2><PRE>
62        <STRONG><A HREF="ncurses.3x.html">curses(3X)</A></STRONG>, <STRONG><A HREF="menu.3x.html">menu(3X)</A></STRONG>.
63
64        The header file <STRONG>&lt;menu.h&gt;</STRONG> automatically includes the header
65        file <STRONG>&lt;curses.h&gt;</STRONG>.
66
67
68 </PRE>
69 <H2>PORTABILITY</H2><PRE>
70        These routines emulate the System V  menu  library.   They
71        were not supported on Version 7 or BSD versions.
72
73
74 </PRE>
75 <H2>AUTHORS</H2><PRE>
76        Juergen  Pfeifer.   Manual  pages  and  adaptation for new
77        curses by Eric S. Raymond.
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 </PRE>
121 </BODY>
122 </HTML>