]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/mitem_opts.3x
ncurses 6.2 - patch 20210821
[ncurses.git] / man / mitem_opts.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright 2018-2019,2020 Thomas E. Dickey                                *
4 .\" Copyright 1998-2010,2015 Free Software Foundation, Inc.                  *
5 .\"                                                                          *
6 .\" Permission is hereby granted, free of charge, to any person obtaining a  *
7 .\" copy of this software and associated documentation files (the            *
8 .\" "Software"), to deal in the Software without restriction, including      *
9 .\" without limitation the rights to use, copy, modify, merge, publish,      *
10 .\" distribute, distribute with modifications, sublicense, and/or sell       *
11 .\" copies of the Software, and to permit persons to whom the Software is    *
12 .\" furnished to do so, subject to the following conditions:                 *
13 .\"                                                                          *
14 .\" The above copyright notice and this permission notice shall be included  *
15 .\" in all copies or substantial portions of the Software.                   *
16 .\"                                                                          *
17 .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS  *
18 .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF               *
19 .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.   *
20 .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,   *
21 .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR    *
22 .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR    *
23 .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE.                               *
24 .\"                                                                          *
25 .\" Except as contained in this notice, the name(s) of the above copyright   *
26 .\" holders shall not be used in advertising or otherwise to promote the     *
27 .\" sale, use or other dealings in this Software without prior written       *
28 .\" authorization.                                                           *
29 .\"***************************************************************************
30 .\"
31 .\" $Id: mitem_opts.3x,v 1.16 2020/10/17 23:52:26 tom Exp $
32 .TH mitem_opts 3X ""
33 .SH NAME
34 \fBset_item_opts\fP,
35 \fBitem_opts_on\fP,
36 \fBitem_opts_off\fP,
37 \fBitem_opts\fR \- set and get menu item options
38 .SH SYNOPSIS
39 \fB#include <menu.h>\fR
40 .sp
41 \fBint set_item_opts(ITEM *\fP\fIitem\fP\fB, Item_Options \fP\fIopts\fP\fB);\fP
42 .br
43 \fBItem_Options item_opts(const ITEM *\fP\fIitem\fP\fB);\fP
44 .sp
45 \fBint item_opts_on(ITEM *\fP\fIitem\fP\fB, Item_Options \fP\fIopts\fP\fB);\fP
46 .br
47 \fBint item_opts_off(ITEM *\fP\fIitem\fP\fB, Item_Options \fP\fIopts\fP\fB);\fP
48 .br
49 .SH DESCRIPTION
50 The function \fBset_item_opts\fR sets all the given item's option bits (menu
51 option bits may be logically-OR'ed together).
52 .PP
53 The function \fBitem_opts_on\fR turns on the given option bits, and leaves
54 others alone.
55 .PP
56 The function \fBitem_opts_off\fR turns off the given option bits, and leaves
57 others alone.
58 .PP
59 The function \fBitem_opts\fR returns the item's current option bits.
60 .PP
61 There is only one defined option bit mask, \fBO_SELECTABLE\fR.  When this is
62 on, the item may be selected during menu processing.
63 This option defaults
64 to on.
65 .SH RETURN VALUE
66 Except for \fBitem_opts\fR, each routine returns one of the following:
67 .TP 5
68 .B E_OK
69 The routine succeeded.
70 .TP 5
71 .B E_SYSTEM_ERROR
72 System error occurred (see \fBerrno\fR(3)).
73 .SH SEE ALSO
74 \fBcurses\fR(3X), \fBmenu\fR(3X).
75 .SH NOTES
76 The header file \fB<menu.h>\fR automatically includes the header file
77 \fB<curses.h>\fR.
78 .SH PORTABILITY
79 These routines emulate the System V menu library.
80 They were not supported on
81 Version 7 or BSD versions.
82 .SH AUTHORS
83 Juergen Pfeifer.
84 Manual pages and adaptation for new curses by Eric S. Raymond.