4 <STRONG>menu_win</STRONG> - make and break menu window and subwindow asso-
10 <STRONG>#include</STRONG> <STRONG><menu.h></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);
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.
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.
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
34 The function <STRONG>scale_menu</STRONG> returns the minimum size required
35 for the subwindow of <EM>menu</EM>.
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
44 <STRONG>E_OK</STRONG> The routine succeeded.
46 <STRONG>E_SYSTEM_ERROR</STRONG>
47 System error occurred (see <STRONG>errno</STRONG>).
49 <STRONG>E_BAD_ARGUMENT</STRONG>
50 Routine detected an incorrect or out-of-range argu-
53 <STRONG>E_POSTED</STRONG>
54 The menu has already been posted.
56 <STRONG>E_NOT_CONNECTED</STRONG>
57 No items are connected to the menu.
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>.
64 The header file <STRONG><menu.h></STRONG> automatically includes the header
65 file <STRONG><curses.h></STRONG>.
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.
76 Juergen Pfeifer. Manual pages and adaptation for new
77 curses by Eric S. Raymond.