]> ncurses.scripts.mit.edu Git - ncurses.git/blob - man/menu_attributes.3x
ncurses 5.9 - patch 20131116
[ncurses.git] / man / menu_attributes.3x
1 '\" t
2 .\"***************************************************************************
3 .\" Copyright (c) 1998-2008,2010 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.12 2010/12/04 18:40:45 tom Exp $
31 .TH menu_attributes 3X ""
32 .SH NAME
33 \fBmenu_attributes\fR \- color and attribute control for menus
34 .SH SYNOPSIS
35 \fB#include <menu.h>\fR
36 .br
37 int set_menu_fore(MENU *menu, chtype attr);
38 .br
39 chtype menu_fore(const MENU *menu);
40 .br
41 int set_menu_back(MENU *menu, chtype attr);
42 .br
43 chtype menu_back(const MENU *menu);
44 .br
45 int set_menu_grey(MENU *menu, chtype attr);
46 .br
47 chtype menu_grey(const MENU *menu);
48 .br
49 int set_menu_pad(MENU *menu, int pad);
50 .br
51 int menu_pad(const MENU *menu);
52 .br
53 .SH DESCRIPTION
54 The function \fBset_menu_fore\fR sets the foreground attribute of
55 \fImenu\fR. This is the highlight used for selected menu items.
56 \fBmenu_fore\fR returns the foreground attribute.  The default
57 is \fBA_REVERSE\fR.
58 .PP
59 The function \fBset_menu_back\fR sets the background attribute of
60 \fImenu\fR. This is the highlight used for selectable (but not currently
61 selected) menu items.  The function \fBmenu_back\fR returns the background
62 attribute.  The default is \fBA_NORMAL\fR.
63 .PP
64 The function \fBset_menu_grey\fR sets the grey attribute of \fImenu\fR. This is
65 the highlight used for un-selectable menu items in menus that permit more than
66 one selection.  The function \fBmenu_grey\fR returns the grey attribute.
67 The default is \fBA_UNDERLINE\fR.
68 .PP
69 The function \fBset_menu_pad\fR sets the character used to fill the space
70 between the name and description parts of a menu item.  \fBmenu_pad\fR returns
71 the given menu's pad character.  The default is a blank.
72 .SH RETURN VALUE
73 These routines return one of the following:
74 .TP 5
75 .B E_OK
76 The routine succeeded.
77 .TP 5
78 .B E_SYSTEM_ERROR
79 System error occurred (see \fBerrno\fR).
80 .TP 5
81 .B E_BAD_ARGUMENT
82 Routine detected an incorrect or out-of-range argument.
83 .SH SEE ALSO
84 \fBcurses\fR(3X) and related pages whose names begin "menu_" for detailed
85 descriptions of the entry points.
86 .SH NOTES
87 The header file \fB<menu.h>\fR automatically includes the header file
88 \fB<curses.h>\fR.
89 .SH PORTABILITY
90 These routines emulate the System V menu library.  They were not supported on
91 Version 7 or BSD versions.
92 .SH AUTHORS
93 Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric
94 S. Raymond.