]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/menu_win.3x
ncurses 4.1
[ncurses.git] / man / menu_win.3x
1 '\" t
2 .TH menu_win 3X ""
3 .SH NAME
4 \fBmenu_win\fR - make and break menu window and subwindow associations
5 .SH SYNOPSIS
6 \fB#include <menu.h>\fR
7 .br
8 int set_menu_win(MENU *menu, WINDOW *win);
9 .br
10 WINDOW *menu_win(const MENU *menu);
11 .br
12 int set_menu_sub(MENU *menu, WINDOW *sub);
13 .br
14 WINDOW *menu_sub(const MENU *menu);
15 .br
16 int scale_menu(const MENU *menu, int *rows, int *columns);
17 .br
18 .SH DESCRIPTION
19 Every menu has an associated pair of \fBcurses\fR windows.  The menu window
20 displays any title and border associated with the window; the menu subwindow
21 displays the items of the menu that are currently available for selection.
22
23 The first four functions get and set those windows.  It is not necessary to set
24 either window; by default, the driver code uses \fBstdscr\fR for both.
25
26 In the \fBset_\fR functions, window argument of \fBNULL\fR is treated as though
27 it were \fBstsdcr\fR.  A menu argument of \fBNULL\fR is treated as a request
28 to change the system default menu window or subwindow.
29
30 The function \fBscale_menu\fR returns the minimum size required for the
31 subwindow of \fImenu\fR. 
32 .SH RETURN VALUE
33 Routines that return pointers return \fBNULL\fR on error.  Routines that return
34 an integer return one of the following error codes:
35 .TP 5
36 \fBE_OK\fR
37 The routine succeeded.
38 .TP 5
39 \fBE_SYSTEM_ERROR\fR
40 System error occurred (see \fBerrno\fR).
41 .TP 5
42 \fBE_BAD_ARGUMENT\fR
43 Routine detected an incorrect or out-of-range argument.
44 .TP 5
45 \fBE_POSTED\fR
46 The menu has already been posted.
47 .TP 5
48 \fBE_NOT_CONNECTED\fR
49 No items are connected to the menu.
50 .SH SEE ALSO
51 \fBcurses\fR(3X), \fBmenu\fR(3X).
52 .SH NOTES
53 The header file \fB<menu.h>\fR automatically includes the header file
54 \fB<curses.h>\fR.
55 .SH PORTABILITY
56 These routines emulate the System V menu library.  They were not supported on
57 Version 7 or BSD versions.
58 .SH AUTHORS
59 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
60 S. Raymond.
61 .\"#
62 .\"# The following sets edit modes for GNU EMACS
63 .\"# Local Variables:
64 .\"# mode:nroff
65 .\"# fill-column:79
66 .\"# End: