menu_attributes(3X)
π menu_attributes β bestie edition
ok so this is menu_attributes(3X) from the Library calls section, and it's literally all about making your menus look cute β colors, attributes, padding, the whole glow-up β¨
πΈ NAME πΈ
menu_back, menu_fore, menu_grey, menu_pad, set_menu_back, set_menu_fore, set_menu_grey, set_menu_pad β color and attribute control for menus π
like... it's giving makeover montage. for menus. no cap.
β¨ 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);
see how every setter has a matching getter? setter/gutter energy. iconic. π«Ά
π DESCRIPTION π
okay bestie, there's basically four glow-up levers here and each one has a "set it" and a "read it back" version. let's go one at a time π§
set_menu_fore / menu_fore
set_menu_fore sets the foreground attribute of menu. this is the highlight used for selected menu items β like the main character of your menu, the one with the spotlight on it π
menu_fore returns the foreground attribute.
the default is A_REVERSE.
set_menu_back / menu_back
set_menu_back sets the background attribute of menu. this one is the highlight used for selectable (but not currently selected) menu items β the supporting cast, cute but not on stage yet π
menu_back returns the background attribute.
the default is A_NORMAL.
set_menu_grey / menu_grey
set_menu_grey sets the grey attribute of menu. this is the highlight used for un-selectable menu items β but ONLY in menus that permit more than one selection, iykyk.
menu_grey returns the grey attribute.
the default is A_UNDERLINE.
set_menu_pad / menu_pad
set_menu_pad sets the character used to fill the space between the name and description parts of a menu item. like the little filler dots between the label and the text. the ~aesthetic~ spacing, basically β¨
menu_pad returns the given menu's pad character.
the default is a blank.
π₯ RETURN VALUE π₯
these routines return one of the following:
E_OKβ the routine succeeded. we love to see it πE_SYSTEM_ERRORβ a system error occurred (seeerrno(3)). not the vibe πE_BAD_ARGUMENTβ the routine detected an incorrect or out-of-range argument. bestie... what did you pass in π
π PORTABILITY π
these routines emulate the System V menu library. they were not supported on Version 7 or BSD versions. so if you're time-traveling back to old BSD, this page isn't gonna help you, sorry π«
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond.
legends, fr fr π«Ά
π¦ SEE ALSO π¦
curses(3X) and related pages whose names begin βmenu_β for detailed descriptions of the entry points.
like, go read those too. the lore is deep π
and that's the whole page, bestie β this was ncurses 6.6, dated 2024-03-16, signing off π
β¨ stay glossy, keep your attributes set, and remember: a menu without A_REVERSE on its selected item is just... a list. periodt π
π¦ where this page comes from
- alpine 3.24: ncurses-doc 6.6_p20260516-r0 Β· X11
- arch rolling: ncurses 6.6-2 Β· MIT-open-group
- fedora 44: ncurses-devel 6.6-1.fc44 Β· MIT-open-group
- fedora 44: ncurses-devel 6.6-1.fc44 Β· MIT-open-group
- Copyright 2018-2023,2024 Thomas E. Dickey
- Copyright 1998-2010,2015 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms