]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/menu_attributes.3x
ncurses 6.2 - patch 20200301
[ncurses.git] / man / menu_attributes.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: menu_attributes.3x,v 1.17 2020/02/02 23:34:34 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\fR,
39 \fBmenu_fore\fR,
40 \fBmenu_grey\fR,
41 \fBmenu_pad\fR,
42 \fBset_menu_back\fR,
43 \fBset_menu_fore\fR,
44 \fBset_menu_grey\fR,
45 \fBset_menu_pad\fR \- color and attribute control for menus
46 .SH SYNOPSIS
47 \fB#include <menu.h>\fR
48 .br
49 int set_menu_fore(MENU *menu, chtype attr);
50 .br
51 chtype menu_fore(const MENU *menu);
52 .br
53 int set_menu_back(MENU *menu, chtype attr);
54 .br
55 chtype menu_back(const MENU *menu);
56 .br
57 int set_menu_grey(MENU *menu, chtype attr);
58 .br
59 chtype menu_grey(const MENU *menu);
60 .br
61 int set_menu_pad(MENU *menu, int pad);
62 .br
63 int menu_pad(const MENU *menu);
64 .br
65 .SH DESCRIPTION
66 The function \fBset_menu_fore\fR sets the foreground attribute of
67 \fImenu\fR. This is the highlight used for selected menu items.
68 \fBmenu_fore\fR returns the foreground attribute.
69 The default
70 is \fBA_REVERSE\fR.
71 .PP
72 The function \fBset_menu_back\fR sets the background attribute of
73 \fImenu\fR. This is the highlight used for selectable (but not currently
74 selected) menu items.
75 The function \fBmenu_back\fR returns the background
76 attribute.
77 The default is \fBA_NORMAL\fR.
78 .PP
79 The function \fBset_menu_grey\fR sets the grey attribute of \fImenu\fR. 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\fR returns the grey attribute.
83 The default is \fBA_UNDERLINE\fR.
84 .PP
85 The function \fBset_menu_pad\fR sets the character used to fill the space
86 between the name and description parts of a menu item.
87 \fBmenu_pad\fR 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\fR(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\fR(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>\fR automatically includes the header file
106 \fB<curses.h>\fR.
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.