]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/menu_items.3x
ncurses 4.1
[ncurses.git] / man / menu_items.3x
1 '\" t
2 .TH menu_items 3X ""
3 .SH NAME
4 \fBmenu_items\fR - make and break connections between items and menus
5 .SH SYNOPSIS
6 \fB#include <menu.h>\fR
7 .br
8 int set_menu_items(MENU *menu, ITEM **items);
9 .br
10 ITEM **menu_items(const MENU *menu);
11 .br
12 int item_count(const MENU *menu);
13 .br
14 .SH DESCRIPTION
15 The function \fBset_menu_items\fR changes the item pointer array of the given
16 \fImenu\fR.  The array must be terminated by a \fBNULL\fR.
17
18 The function \fBmenu_items\fR returns the item array of the given menu.
19
20 The function \fBitem_count\fR returns the count of items in \fImenu\fR.
21 .SH RETURN VALUES
22 The function \fBmenu_items\fR returns \fBNULL\fR on error.
23
24 The function \fBitem_count\fR returns \fBERR\fR (the general \fBcurses\fR error
25 return value) on error.
26
27 The function \fBset_menu_items\fR returns one of the following codes on error:
28 .TP 5
29 \fBE_OK\fR
30 The routine succeeded.
31 .TP 5
32 \fBE_SYSTEM_ERROR\fR
33 System error occurred (see \fBerrno\fR).
34 .TP 5
35 \fBE_BAD_ARGUMENT\fR
36 Routine detected an incorrect or out-of-range argument.
37 .TP 5
38 \fBE_POSTED\fR
39 The menu is already posted.
40 .TP 5
41 \fBE_NOT_CONNECTED\fR
42 No items are connected to the menu.
43 .SH SEE ALSO
44 \fBcurses\fR(3X), \fBmenu\fR(3X).
45 .SH NOTES
46 The header file \fB<menu.h>\fR automatically includes the header file
47 \fB<curses.h>\fR.
48 .SH PORTABILITY
49 These routines emulate the System V menu library.  They were not supported on
50 Version 7 or BSD versions.
51
52 The SVr4 menu library documentation specifies the \fBitem_count\fR error value
53 as -1 (which is the value of \fBERR\fR).
54 .SH AUTHORS
55 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
56 S. Raymond.
57 .\"#
58 .\"# The following sets edit modes for GNU EMACS
59 .\"# Local Variables:
60 .\"# mode:nroff
61 .\"# fill-column:79
62 .\"# End: