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