]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/mitem_value.3x
ncurses 4.1
[ncurses.git] / man / mitem_value.3x
1 '\" t
2 .TH mitem_value 3X ""
3 .SH NAME
4 \fBmitem_value\fR - set and get menu item values
5 .SH SYNOPSIS
6 \fB#include <menu.h>\fR
7 .br
8 int set_item_value(ITEM *item, bool value);
9 .br
10 bool item_value(const ITEM *item);
11 .br
12 .SH DESCRIPTION
13 If you turn off the menu option \fBO_ONEVALUE\fR (e.g., with
14 \fBset_menu_opts\fR or \fBmenu_opts_off\fR; see \fBmenu_opts\fR(3x)), the menu
15 becomes multi-valued; that is, more than one item may simultaneously be
16 selected.
17
18 In a multi_valued menu, you can used \fBset_item_value\fR to select the
19 given menu item (second argument \fBTRUE\fR) or deselect it (second argument
20 \fBFALSE\fR).
21 .SH RETURN VALUE
22 The function \fBset_item_value\fR returns one of the following:
23 .TP 5
24 \fBE_OK\fR
25 The routine succeeded.
26 .TP 5
27 \fBE_SYSTEM_ERROR\fR
28 System error occurred (see \fBerrno\fR).
29 .TP 5
30 \fBE_REQUEST_DENIED\fR
31 The menu driver could not process the request.
32 .SH SEE ALSO
33 \fBcurses\fR(3X), \fBmenu\fR(3X).
34 .SH NOTES
35 The header file \fB<menu.h>\fR automatically includes the header file
36 \fB<curses.h>\fR.
37 .SH PORTABILITY
38 These routines emulate the System V menu library.  They were not supported on
39 Version 7 or BSD versions.
40 .SH AUTHORS
41 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
42 S. Raymond.
43 .\"#
44 .\"# The following sets edit modes for GNU EMACS
45 .\"# Local Variables:
46 .\"# mode:nroff
47 .\"# fill-column:79
48 .\"# End: