Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | .\"*************************************************************************** |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 2 | .\" Copyright 2018-2023,2024 Thomas E. Dickey * |
| 3 | .\" Copyright 1998-2010,2015 Free Software Foundation, Inc. * |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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 | .\" |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 30 | .\" $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 Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 42 | .SH NAME |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 43 | \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 \- |
| 51 | color and attribute control for menus |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 52 | .SH SYNOPSIS |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 53 | .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 Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 68 | .SH DESCRIPTION |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 69 | The 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. |
| 72 | The default |
| 73 | is \fBA_REVERSE\fP. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 74 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 75 | The function \fBset_menu_back\fP sets the background attribute of |
| 76 | \fImenu\fP. This is the highlight used for selectable (but not currently |
| 77 | selected) menu items. |
| 78 | The function \fBmenu_back\fP returns the background |
| 79 | attribute. |
| 80 | The default is \fBA_NORMAL\fP. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 81 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 82 | The function \fBset_menu_grey\fP sets the grey attribute of \fImenu\fP. This is |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 83 | the highlight used for un-selectable menu items in menus that permit more than |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 84 | one selection. |
| 85 | The function \fBmenu_grey\fP returns the grey attribute. |
| 86 | The default is \fBA_UNDERLINE\fP. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 87 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 88 | The function \fBset_menu_pad\fP sets the character used to fill the space |
| 89 | between the name and description parts of a menu item. |
| 90 | \fBmenu_pad\fP returns |
| 91 | the given menu's pad character. |
| 92 | The default is a blank. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 93 | .SH RETURN VALUE |
| 94 | These routines return one of the following: |
| 95 | .TP 5 |
| 96 | .B E_OK |
| 97 | The routine succeeded. |
| 98 | .TP 5 |
| 99 | .B E_SYSTEM_ERROR |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 100 | System error occurred (see \fBerrno\fP(3)). |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 101 | .TP 5 |
| 102 | .B E_BAD_ARGUMENT |
| 103 | Routine detected an incorrect or out-of-range argument. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 104 | .SH PORTABILITY |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 105 | These routines emulate the System V menu library. |
| 106 | They were not supported on |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 107 | Version 7 or BSD versions. |
| 108 | .SH AUTHORS |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 109 | Juergen Pfeifer. |
| 110 | Manual 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_\*('' |
| 113 | for detailed descriptions of the entry points. |