1 .\"***************************************************************************
2 .\" Copyright 2018-2023,2024 Thomas E. Dickey *
3 .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. *
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: *
13 .\" The above copyright notice and this permission notice shall be included *
14 .\" in all copies or substantial portions of the Software. *
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. *
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 *
28 .\"***************************************************************************
30 .\" $Id: menu_attributes.3x,v 1.36 2024/03/16 15:35:01 tom Exp $
31 .TH menu_attributes 3X 2024-03-16 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
51 color and attribute control for menus
56 \fBint set_menu_fore(MENU *\fImenu\fP, chtype \fIattr\fP);
57 \fBchtype menu_fore(const MENU *\fImenu\fP);
59 \fBint set_menu_back(MENU *\fImenu\fP, chtype \fIattr\fP);
60 \fBchtype menu_back(const MENU *\fImenu\fP);
62 \fBint set_menu_grey(MENU *\fImenu\fP, chtype \fIattr\fP);
63 \fBchtype menu_grey(const MENU *\fImenu\fP);
65 \fBint set_menu_pad(MENU *\fImenu\fP, int \fIpad\fP);
66 \fBint menu_pad(const MENU *\fImenu\fP);
69 The function \fBset_menu_fore\fP sets the foreground attribute of
70 \fImenu\fP. This is the highlight used for selected menu items.
71 \fBmenu_fore\fP returns the foreground attribute.
75 The function \fBset_menu_back\fP sets the background attribute of
76 \fImenu\fP. This is the highlight used for selectable (but not currently
78 The function \fBmenu_back\fP returns the background
80 The default is \fBA_NORMAL\fP.
82 The function \fBset_menu_grey\fP sets the grey attribute of \fImenu\fP. This is
83 the highlight used for un-selectable menu items in menus that permit more than
85 The function \fBmenu_grey\fP returns the grey attribute.
86 The default is \fBA_UNDERLINE\fP.
88 The function \fBset_menu_pad\fP sets the character used to fill the space
89 between the name and description parts of a menu item.
90 \fBmenu_pad\fP returns
91 the given menu's pad character.
92 The default is a blank.
94 These routines return one of the following:
97 The routine succeeded.
100 System error occurred (see \fBerrno\fP(3)).
103 Routine detected an incorrect or out-of-range argument.
105 These routines emulate the System V menu library.
106 They were not supported on
107 Version 7 or BSD versions.
110 Manual pages and adaptation for new curses by Eric S. Raymond.
112 \fB\%curses\fP(3X) and related pages whose names begin \*(``menu_\*(''
113 for detailed descriptions of the entry points.