]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/menu_opts.3x
ncurses 6.2 - patch 20210213
[ncurses.git] / man / menu_opts.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright 2018-2019,2020 Thomas E. Dickey                                *
4 .\" Copyright 1998-2015,2016 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: menu_opts.3x,v 1.18 2020/10/17 23:46:35 tom Exp $
32 .TH menu_opts 3X ""
33 .SH NAME
34 \fBset_menu_opts\fP,
35 \fBmenu_opts_on\fP,
36 \fBmenu_opts_off\fP,
37 \fBmenu_opts\fR \- set and get menu options
38 .SH SYNOPSIS
39 \fB#include <menu.h>\fR
40 .sp
41 \fBint set_menu_opts(MENU *\fP\fImenu\fP\fB, Menu_Options \fP\fIopts\fP\fB);\fP
42 .br
43 \fBMenu_Options menu_opts(const MENU *\fP\fImenu\fP\fB);\fP
44 .sp
45 \fBint menu_opts_on(MENU *\fP\fImenu\fP\fB, Menu_Options \fP\fIopts\fP\fB);\fP
46 .br
47 \fBint menu_opts_off(MENU *\fP\fImenu\fP\fB, Menu_Options \fP\fIopts\fP\fB);\fP
48 .br
49 .SH DESCRIPTION
50 The function \fBset_menu_opts\fR sets all the given menu's option bits (menu
51 option bits may be logically-OR'ed together).
52 .PP
53 The function \fBmenu_opts_on\fR turns on the given option bits, and leaves
54 others alone.
55 .PP
56 The function \fBmenu_opts_off\fR turns off the given option bits, and leaves
57 others alone.
58 .PP
59 The function \fBmenu_opts\fR returns the menu's current option bits.
60 .PP
61 The following options are defined (all are on by default):
62 .TP 5
63 O_ONEVALUE
64 Only one item can be selected for this menu.
65 .TP 5
66 O_SHOWDESC
67 Display the item descriptions when the menu is posted.
68 .TP 5
69 O_ROWMAJOR
70 Display the menu in row-major order.
71 .TP 5
72 O_IGNORECASE
73 Ignore the case when pattern-matching.
74 .TP 5
75 O_SHOWMATCH
76 Move the cursor to within the item name while pattern-matching.
77 .TP 5
78 O_NONCYCLIC
79 Don't wrap around next-item and previous-item,
80 requests to the other end of the menu.
81 .TP 5
82 O_MOUSE_MENU
83 If user clicks with the mouse
84 and it does not fall on the currently active menu,
85 push \fBKEY_MOUSE\fP and the \fBMEVENT\fP data
86 back on the queue to allow processing in another part of the calling program.
87 .SH RETURN VALUE
88 Except for \fBmenu_opts\fR, each routine returns one of the following:
89 .TP 5
90 .B E_OK
91 The routine succeeded.
92 .TP 5
93 .B E_SYSTEM_ERROR
94 System error occurred (see \fBerrno\fR(3)).
95 .TP 5
96 .B E_POSTED
97 The menu is already posted.
98 .SH SEE ALSO
99 \fBcurses\fR(3X), \fBmenu\fR(3X).
100 .SH NOTES
101 The header file \fB<menu.h>\fR automatically includes the header file
102 \fB<curses.h>\fR.
103 .SH PORTABILITY
104 These routines emulate the System V menu library.
105 They were not supported on
106 Version 7 or BSD versions.
107 .SH AUTHORS
108 Juergen Pfeifer.
109 Manual pages and adaptation for new curses by Eric S. Raymond.