]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/mitem_value.3x
ncurses 6.0 - patch 20170128
[ncurses.git] / man / mitem_value.3x
1 .\"***************************************************************************
2 .\" Copyright (c) 1998-2010,2015 Free Software Foundation, Inc.              *
3 .\"                                                                          *
4 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
5 .\" copy of this software and associated documentation files (the            *
6 .\" "Software"), to deal in the Software without restriction, including      *
7 .\" without limitation the rights to use, copy, modify, merge, publish,      *
8 .\" distribute, distribute with modifications, sublicense, and/or sell       *
9 .\" copies of the Software, and to permit persons to whom the Software is    *
10 .\" furnished to do so, subject to the following conditions:                 *
11 .\"                                                                          *
12 .\" The above copyright notice and this permission notice shall be included  *
13 .\" in all copies or substantial portions of the Software.                   *
14 .\"                                                                          *
15 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
16 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
17 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
18 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
19 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
20 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
21 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
22 .\"                                                                          *
23 .\" Except as contained in this notice, the name(s) of the above copyright   *
24 .\" holders shall not be used in advertising or otherwise to promote the     *
25 .\" sale, use or other dealings in this Software without prior written       *
26 .\" authorization.                                                           *
27 .\"***************************************************************************
28 .\"
29 .\" $Id: mitem_value.3x,v 1.11 2015/12/05 23:01:16 tom Exp $
30 .TH mitem_value 3X ""
31 .SH NAME
32 \fBset_item_value\fP,
33 \fBitem_value\fP \- set and get menu item values
34 .SH SYNOPSIS
35 \fB#include <menu.h>\fR
36 .br
37 int set_item_value(ITEM *item, bool value);
38 .br
39 bool item_value(const ITEM *item);
40 .br
41 .SH DESCRIPTION
42 If you turn off the menu option \fBO_ONEVALUE\fR (e.g., with
43 \fBset_menu_opts\fR or \fBmenu_opts_off\fR; see \fBmenu_opts\fR(3X)), the menu
44 becomes multi-valued; that is, more than one item may simultaneously be
45 selected.
46 .PP
47 In a multi_valued menu, you can used \fBset_item_value\fR to select the
48 given menu item (second argument \fBTRUE\fR) or deselect it (second argument
49 \fBFALSE\fR).
50 .SH RETURN VALUE
51 The function \fBset_item_value\fR returns one of the following:
52 .TP 5
53 .B E_OK
54 The routine succeeded.
55 .TP 5
56 .B E_SYSTEM_ERROR
57 System error occurred (see \fBerrno\fR).
58 .TP 5
59 .B E_REQUEST_DENIED
60 The menu driver could not process the request.
61 .SH SEE ALSO
62 \fBcurses\fR(3X), \fBmenu\fR(3X).
63 .SH NOTES
64 The header file \fB<menu.h>\fR automatically includes the header file
65 \fB<curses.h>\fR.
66 .SH PORTABILITY
67 These routines emulate the System V menu library.  They were not supported on
68 Version 7 or BSD versions.
69 .SH AUTHORS
70 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
71 S. Raymond.