blob: 7bce42d24be28ee3626786430bfe640ed1f284f1 [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301.\"***************************************************************************
micky3879b9f5e72025-07-08 18:04:53 -04002.\" Copyright 2018-2023,2024 Thomas E. Dickey *
3.\" Copyright 1998-2010,2015 Free Software Foundation, Inc. *
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05304.\" *
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.\"
micky3879b9f5e72025-07-08 18:04:53 -040030.\" $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"
32.ie \n(.g \{\
33.ds `` \(lq
34.ds '' \(rq
35.\}
36.el \{\
37.ie t .ds `` ``
38.el .ds `` ""
39.ie t .ds '' ''
40.el .ds '' ""
41.\}
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053042.SH NAME
micky3879b9f5e72025-07-08 18:04:53 -040043\fBmenu_back\fP,
44\fBmenu_fore\fP,
45\fBmenu_grey\fP,
46\fBmenu_pad\fP,
47\fBset_menu_back\fP,
48\fBset_menu_fore\fP,
49\fBset_menu_grey\fP,
50\fBset_menu_pad\fP \-
51color and attribute control for menus
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053052.SH SYNOPSIS
micky3879b9f5e72025-07-08 18:04:53 -040053.nf
54\fB#include <menu.h>
55.PP
56\fBint set_menu_fore(MENU *\fImenu\fP, chtype \fIattr\fP);
57\fBchtype menu_fore(const MENU *\fImenu\fP);
58.PP
59\fBint set_menu_back(MENU *\fImenu\fP, chtype \fIattr\fP);
60\fBchtype menu_back(const MENU *\fImenu\fP);
61.PP
62\fBint set_menu_grey(MENU *\fImenu\fP, chtype \fIattr\fP);
63\fBchtype menu_grey(const MENU *\fImenu\fP);
64.PP
65\fBint set_menu_pad(MENU *\fImenu\fP, int \fIpad\fP);
66\fBint menu_pad(const MENU *\fImenu\fP);
67.fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053068.SH DESCRIPTION
micky3879b9f5e72025-07-08 18:04:53 -040069The 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.
72The default
73is \fBA_REVERSE\fP.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053074.PP
micky3879b9f5e72025-07-08 18:04:53 -040075The function \fBset_menu_back\fP sets the background attribute of
76\fImenu\fP. This is the highlight used for selectable (but not currently
77selected) menu items.
78The function \fBmenu_back\fP returns the background
79attribute.
80The default is \fBA_NORMAL\fP.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053081.PP
micky3879b9f5e72025-07-08 18:04:53 -040082The function \fBset_menu_grey\fP sets the grey attribute of \fImenu\fP. This is
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053083the highlight used for un-selectable menu items in menus that permit more than
micky3879b9f5e72025-07-08 18:04:53 -040084one selection.
85The function \fBmenu_grey\fP returns the grey attribute.
86The default is \fBA_UNDERLINE\fP.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053087.PP
micky3879b9f5e72025-07-08 18:04:53 -040088The function \fBset_menu_pad\fP sets the character used to fill the space
89between the name and description parts of a menu item.
90\fBmenu_pad\fP returns
91the given menu's pad character.
92The default is a blank.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053093.SH RETURN VALUE
94These routines return one of the following:
95.TP 5
96.B E_OK
97The routine succeeded.
98.TP 5
99.B E_SYSTEM_ERROR
micky3879b9f5e72025-07-08 18:04:53 -0400100System error occurred (see \fBerrno\fP(3)).
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530101.TP 5
102.B E_BAD_ARGUMENT
103Routine detected an incorrect or out-of-range argument.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530104.SH PORTABILITY
micky3879b9f5e72025-07-08 18:04:53 -0400105These routines emulate the System V menu library.
106They were not supported on
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530107Version 7 or BSD versions.
108.SH AUTHORS
micky3879b9f5e72025-07-08 18:04:53 -0400109Juergen Pfeifer.
110Manual pages and adaptation for new curses by Eric S. Raymond.
111.SH SEE ALSO
112\fB\%curses\fP(3X) and related pages whose names begin \*(``menu_\*(''
113for detailed descriptions of the entry points.