menu_attributes(3X)
β¨ menu_attributes(3X) β¨
okay bestie, so this is a page from the <menu.h> zone β the ncurses menu library, and it's literally all about making your menus look cute: colours, attributes, padding, the whole vibe. π
πΈ SYNOPSIS πΈ
#include <menu.h>
int set_menu_fore(MENU *menu, chtype attr);
chtype menu_fore(const MENU *menu);
int set_menu_back(MENU *menu, chtype attr);
chtype menu_back(const MENU *menu);
int set_menu_grey(MENU *menu, chtype attr);
chtype menu_grey(const MENU *menu);
int set_menu_pad(MENU *menu, int pad);
int menu_pad(const MENU *menu);
π DESCRIPTION π
okay so there are four little duos here β each one has a set_ function that sets the vibe, and a plain getter that returns it. iconic symmetry, no cap. π¦
foreground β¨ β set_menu_fore sets the foreground attribute of menu. this is the highlight used for selected menu items. and menu_fore returns that foreground attribute. the default? A_REVERSE. slay.
background β¨ β set_menu_back sets the background attribute of menu. this is the highlight used for selectable (but not currently selected) menu items. and menu_back returns the background attribute. default is A_NORMAL. as it should be.
grey β¨ β set_menu_grey sets the grey attribute of menu. this is the highlight used for un-selectable menu items in menus that permit more than one selection. menu_grey returns the grey attribute. default is A_UNDERLINE. lowkey a serve.
pad β¨ β set_menu_pad sets the character used to fill the space between the name and description parts of a menu item. menu_pad returns the given menu's pad character. default is a blank. simple, clean, aesthetic. π
π RETURN VALUE π
these routines return one of the following:
E_OKβ the routine succeeded. we love a win. π«ΆE_SYSTEM_ERRORβ system error occurred (seeerrno(3)). πE_BAD_ARGUMENTβ routine detected an incorrect or out-of-range argument. bestie what did you do π
π PORTABILITY π
these routines emulate the System V menu library. they were not supported on Version 7 or BSD versions. so like, know your roots. β
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond.
π₯ SEE ALSO π₯
curses(3X) and related pages whose names begin βmenu_β for detailed descriptions of the entry points. iykyk π§
mwah π this was ncurses 6.5, dated 2024-03-16 β menu_attributes(3X) and that's the whole page, periodt. π
π¦ where this page comes from
- freebsd 14.5: base 14.5
- freebsd 15.1: base 15.1
- Copyright 2018-2023,2024 Thomas E. Dickey
- Copyright 1998-2010,2015 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms