2 .\"***************************************************************************
3 .\" Copyright 2018-2021,2022 Thomas E. Dickey *
4 .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. *
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: *
14 .\" The above copyright notice and this permission notice shall be included *
15 .\" in all copies or substantial portions of the Software. *
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. *
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 *
29 .\"***************************************************************************
31 .\" $Id: menu_attributes.3x,v 1.22 2022/02/12 20:05:11 tom Exp $
32 .TH menu_attributes 3X ""
45 \fBset_menu_pad\fP \- color and attribute control for menus
47 \fB#include <menu.h>\fP
49 \fBint set_menu_fore(MENU *\fImenu\fB, chtype \fIattr\fB);\fR
51 \fBchtype menu_fore(const MENU *\fImenu\fB);\fR
53 \fBint set_menu_back(MENU *\fImenu\fB, chtype \fIattr\fB);\fR
55 \fBchtype menu_back(const MENU *\fImenu\fB);\fR
57 \fBint set_menu_grey(MENU *\fImenu\fB, chtype \fIattr\fB);\fR
59 \fBchtype menu_grey(const MENU *\fImenu\fB);\fR
61 \fBint set_menu_pad(MENU *\fImenu\fB, int \fIpad\fB);\fR
63 \fBint menu_pad(const MENU *\fImenu\fB);\fR
66 The function \fBset_menu_fore\fP sets the foreground attribute of
67 \fImenu\fP. This is the highlight used for selected menu items.
68 \fBmenu_fore\fP returns the foreground attribute.
72 The function \fBset_menu_back\fP sets the background attribute of
73 \fImenu\fP. This is the highlight used for selectable (but not currently
75 The function \fBmenu_back\fP returns the background
77 The default is \fBA_NORMAL\fP.
79 The function \fBset_menu_grey\fP sets the grey attribute of \fImenu\fP. This is
80 the highlight used for un-selectable menu items in menus that permit more than
82 The function \fBmenu_grey\fP returns the grey attribute.
83 The default is \fBA_UNDERLINE\fP.
85 The function \fBset_menu_pad\fP sets the character used to fill the space
86 between the name and description parts of a menu item.
87 \fBmenu_pad\fP returns
88 the given menu's pad character.
89 The default is a blank.
91 These routines return one of the following:
94 The routine succeeded.
97 System error occurred (see \fBerrno\fP(3)).
100 Routine detected an incorrect or out-of-range argument.
102 \fBcurses\fP(3X) and related pages whose names begin \*(``menu_\*('' for detailed
103 descriptions of the entry points.
105 The header file \fB<menu.h>\fP automatically includes the header file
108 These routines emulate the System V menu library.
109 They were not supported on
110 Version 7 or BSD versions.
113 Manual pages and adaptation for new curses by Eric S. Raymond.