]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/menu_attributes.3x
ncurses 6.1 - patch 20191130
[ncurses.git] / man / menu_attributes.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright (c) 1998-2018,2019 Free Software Foundation, Inc.              *
4 .\"                                                                          *
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:                 *
12 .\"                                                                          *
13 .\" The above copyright notice and this permission notice shall be included  *
14 .\" in all copies or substantial portions of the Software.                   *
15 .\"                                                                          *
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.                               *
23 .\"                                                                          *
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       *
27 .\" authorization.                                                           *
28 .\"***************************************************************************
29 .\"
30 .\" $Id: menu_attributes.3x,v 1.16 2019/11/30 21:02:51 tom Exp $
31 .TH menu_attributes 3X ""
32 .ie \n(.g .ds `` \(lq
33 .el       .ds `` ``
34 .ie \n(.g .ds '' \(rq
35 .el       .ds '' ''
36 .SH NAME
37 \fBmenu_back\fR,
38 \fBmenu_fore\fR,
39 \fBmenu_grey\fR,
40 \fBmenu_pad\fR,
41 \fBset_menu_back\fR,
42 \fBset_menu_fore\fR,
43 \fBset_menu_grey\fR,
44 \fBset_menu_pad\fR \- color and attribute control for menus
45 .SH SYNOPSIS
46 \fB#include <menu.h>\fR
47 .br
48 int set_menu_fore(MENU *menu, chtype attr);
49 .br
50 chtype menu_fore(const MENU *menu);
51 .br
52 int set_menu_back(MENU *menu, chtype attr);
53 .br
54 chtype menu_back(const MENU *menu);
55 .br
56 int set_menu_grey(MENU *menu, chtype attr);
57 .br
58 chtype menu_grey(const MENU *menu);
59 .br
60 int set_menu_pad(MENU *menu, int pad);
61 .br
62 int menu_pad(const MENU *menu);
63 .br
64 .SH DESCRIPTION
65 The function \fBset_menu_fore\fR sets the foreground attribute of
66 \fImenu\fR. This is the highlight used for selected menu items.
67 \fBmenu_fore\fR returns the foreground attribute.
68 The default
69 is \fBA_REVERSE\fR.
70 .PP
71 The function \fBset_menu_back\fR sets the background attribute of
72 \fImenu\fR. This is the highlight used for selectable (but not currently
73 selected) menu items.
74 The function \fBmenu_back\fR returns the background
75 attribute.
76 The default is \fBA_NORMAL\fR.
77 .PP
78 The function \fBset_menu_grey\fR sets the grey attribute of \fImenu\fR. This is
79 the highlight used for un-selectable menu items in menus that permit more than
80 one selection.
81 The function \fBmenu_grey\fR returns the grey attribute.
82 The default is \fBA_UNDERLINE\fR.
83 .PP
84 The function \fBset_menu_pad\fR sets the character used to fill the space
85 between the name and description parts of a menu item.
86 \fBmenu_pad\fR returns
87 the given menu's pad character.
88 The default is a blank.
89 .SH RETURN VALUE
90 These routines return one of the following:
91 .TP 5
92 .B E_OK
93 The routine succeeded.
94 .TP 5
95 .B E_SYSTEM_ERROR
96 System error occurred (see \fBerrno\fR(3)).
97 .TP 5
98 .B E_BAD_ARGUMENT
99 Routine detected an incorrect or out-of-range argument.
100 .SH SEE ALSO
101 \fBcurses\fR(3X) and related pages whose names begin \*(``menu_\*('' for detailed
102 descriptions of the entry points.
103 .SH NOTES
104 The header file \fB<menu.h>\fR automatically includes the header file
105 \fB<curses.h>\fR.
106 .SH PORTABILITY
107 These routines emulate the System V menu library.
108 They were not supported on
109 Version 7 or BSD versions.
110 .SH AUTHORS
111 Juergen Pfeifer.
112 Manual pages and adaptation for new curses by Eric S. Raymond.