jcs's openbsd hax
openbsd
1'\" t
2.\" $OpenBSD: menu_attributes.3,v 1.4 2023/10/17 09:52:10 nicm Exp $
3.\"
4.\"***************************************************************************
5.\" Copyright 2018-2022,2023 Thomas E. Dickey *
6.\" Copyright 1998-2010,2015 Free Software Foundation, Inc. *
7.\" *
8.\" Permission is hereby granted, free of charge, to any person obtaining a *
9.\" copy of this software and associated documentation files (the *
10.\" "Software"), to deal in the Software without restriction, including *
11.\" without limitation the rights to use, copy, modify, merge, publish, *
12.\" distribute, distribute with modifications, sublicense, and/or sell *
13.\" copies of the Software, and to permit persons to whom the Software is *
14.\" furnished to do so, subject to the following conditions: *
15.\" *
16.\" The above copyright notice and this permission notice shall be included *
17.\" in all copies or substantial portions of the Software. *
18.\" *
19.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
20.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
21.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
22.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
23.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
24.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
25.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
26.\" *
27.\" Except as contained in this notice, the name(s) of the above copyright *
28.\" holders shall not be used in advertising or otherwise to promote the *
29.\" sale, use or other dealings in this Software without prior written *
30.\" authorization. *
31.\"***************************************************************************
32.\"
33.\" $Id: menu_attributes.3,v 1.4 2023/10/17 09:52:10 nicm Exp $
34.TH menu_attributes 3 2023-07-01 "ncurses 6.4" "Library calls"
35.ie \n(.g .ds `` \(lq
36.el .ds `` ``
37.ie \n(.g .ds '' \(rq
38.el .ds '' ''
39.SH NAME
40\fBmenu_back\fP,
41\fBmenu_fore\fP,
42\fBmenu_grey\fP,
43\fBmenu_pad\fP,
44\fBset_menu_back\fP,
45\fBset_menu_fore\fP,
46\fBset_menu_grey\fP,
47\fBset_menu_pad\fP \- color and attribute control for menus
48.SH SYNOPSIS
49\fB#include <menu.h>\fP
50.sp
51\fBint set_menu_fore(MENU *\fImenu\fB, chtype \fIattr\fB);\fR
52.br
53\fBchtype menu_fore(const MENU *\fImenu\fB);\fR
54.sp
55\fBint set_menu_back(MENU *\fImenu\fB, chtype \fIattr\fB);\fR
56.br
57\fBchtype menu_back(const MENU *\fImenu\fB);\fR
58.sp
59\fBint set_menu_grey(MENU *\fImenu\fB, chtype \fIattr\fB);\fR
60.br
61\fBchtype menu_grey(const MENU *\fImenu\fB);\fR
62.sp
63\fBint set_menu_pad(MENU *\fImenu\fB, int \fIpad\fB);\fR
64.br
65\fBint menu_pad(const MENU *\fImenu\fB);\fR
66.SH DESCRIPTION
67The function \fBset_menu_fore\fP sets the foreground attribute of
68\fImenu\fP. This is the highlight used for selected menu items.
69\fBmenu_fore\fP returns the foreground attribute.
70The default
71is \fBA_REVERSE\fP.
72.PP
73The function \fBset_menu_back\fP sets the background attribute of
74\fImenu\fP. This is the highlight used for selectable (but not currently
75selected) menu items.
76The function \fBmenu_back\fP returns the background
77attribute.
78The default is \fBA_NORMAL\fP.
79.PP
80The function \fBset_menu_grey\fP sets the grey attribute of \fImenu\fP. This is
81the highlight used for un-selectable menu items in menus that permit more than
82one selection.
83The function \fBmenu_grey\fP returns the grey attribute.
84The default is \fBA_UNDERLINE\fP.
85.PP
86The function \fBset_menu_pad\fP sets the character used to fill the space
87between the name and description parts of a menu item.
88\fBmenu_pad\fP returns
89the given menu's pad character.
90The default is a blank.
91.SH RETURN VALUE
92These routines return one of the following:
93.TP 5
94.B E_OK
95The routine succeeded.
96.TP 5
97.B E_SYSTEM_ERROR
98System error occurred (see \fBerrno\fP(3)).
99.TP 5
100.B E_BAD_ARGUMENT
101Routine detected an incorrect or out-of-range argument.
102.SH SEE ALSO
103\fBcurses\fP(3) and related pages whose names begin \*(``menu_\*('' for detailed
104descriptions of the entry points.
105.SH NOTES
106The header file \fB<menu.h>\fP automatically includes the header file
107\fB<curses.h>\fP.
108.SH PORTABILITY
109These routines emulate the System V menu library.
110They were not supported on
111Version 7 or BSD versions.
112.SH AUTHORS
113Juergen Pfeifer.
114Manual pages and adaptation for new curses by Eric S. Raymond.