]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/menu_attributes.3x
ncurses 6.3 - patch 20220212
[ncurses.git] / man / menu_attributes.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright 2018-2021,2022 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: menu_attributes.3x,v 1.22 2022/02/12 20:05:11 tom Exp $
32 .TH menu_attributes 3X ""
33 .ie \n(.g .ds `` \(lq
34 .el       .ds `` ``
35 .ie \n(.g .ds '' \(rq
36 .el       .ds '' ''
37 .SH NAME
38 \fBmenu_back\fP,
39 \fBmenu_fore\fP,
40 \fBmenu_grey\fP,
41 \fBmenu_pad\fP,
42 \fBset_menu_back\fP,
43 \fBset_menu_fore\fP,
44 \fBset_menu_grey\fP,
45 \fBset_menu_pad\fP \- color and attribute control for menus
46 .SH SYNOPSIS
47 \fB#include <menu.h>\fP
48 .sp
49 \fBint set_menu_fore(MENU *\fImenu\fB, chtype \fIattr\fB);\fR
50 .br
51 \fBchtype menu_fore(const MENU *\fImenu\fB);\fR
52 .sp
53 \fBint set_menu_back(MENU *\fImenu\fB, chtype \fIattr\fB);\fR
54 .br
55 \fBchtype menu_back(const MENU *\fImenu\fB);\fR
56 .sp
57 \fBint set_menu_grey(MENU *\fImenu\fB, chtype \fIattr\fB);\fR
58 .br
59 \fBchtype menu_grey(const MENU *\fImenu\fB);\fR
60 .sp
61 \fBint set_menu_pad(MENU *\fImenu\fB, int \fIpad\fB);\fR
62 .br
63 \fBint menu_pad(const MENU *\fImenu\fB);\fR
64 .br
65 .SH DESCRIPTION
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.
69 The default
70 is \fBA_REVERSE\fP.
71 .PP
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
74 selected) menu items.
75 The function \fBmenu_back\fP returns the background
76 attribute.
77 The default is \fBA_NORMAL\fP.
78 .PP
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
81 one selection.
82 The function \fBmenu_grey\fP returns the grey attribute.
83 The default is \fBA_UNDERLINE\fP.
84 .PP
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.
90 .SH RETURN VALUE
91 These routines return one of the following:
92 .TP 5
93 .B E_OK
94 The routine succeeded.
95 .TP 5
96 .B E_SYSTEM_ERROR
97 System error occurred (see \fBerrno\fP(3)).
98 .TP 5
99 .B E_BAD_ARGUMENT
100 Routine detected an incorrect or out-of-range argument.
101 .SH SEE ALSO
102 \fBcurses\fP(3X) and related pages whose names begin \*(``menu_\*('' for detailed
103 descriptions of the entry points.
104 .SH NOTES
105 The header file \fB<menu.h>\fP automatically includes the header file
106 \fB<curses.h>\fP.
107 .SH PORTABILITY
108 These routines emulate the System V menu library.
109 They were not supported on
110 Version 7 or BSD versions.
111 .SH AUTHORS
112 Juergen Pfeifer.
113 Manual pages and adaptation for new curses by Eric S. Raymond.