attributes(3MENU)
β¨ attributes(3MENU) β¨
okay bestie, welcome to attributes(3MENU), a Library calls page that's literally all about making your menus look cute π
it lives in the ncurses fam and it's giving "glow-up but for terminal menus." let's get into it π
πΈ 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 π¨β¨
π¦ 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 π
so there are four vibes you can set on a menu, and each one has a lil setter + getter duo. iconic behavior honestly π
set_menu_foresets the foreground attribute of menu. this is the highlight used for selected menu items. andmenu_forereturns that foreground attribute. the default?A_REVERSEπset_menu_backsets the background attribute of menu. this is the highlight used for selectable (but not currently selected) menu items.menu_backreturns the background attribute. the default isA_NORMALβ¨set_menu_greysets the grey attribute of menu. this is the highlight used for un-selectable menu items in menus that permit more than one selection.menu_greyreturns the grey attribute. the default isA_UNDERLINEπ«Άset_menu_padsets the character used to fill the space between the name and description parts of a menu item.menu_padreturns the given menu's pad character. the default is a blank πΈ
π RETURN VALUE π
these routines return one of the following, no cap:
E_OKβ the routine succeeded πE_SYSTEM_ERRORβ System error occurred (seeerrno(3)) πE_BAD_ARGUMENTβ Routine detected an incorrect or out-of-range argument π
π§ PORTABILITY π§
these routines emulate the System V menu library. they were not supported on Version 7 or BSD versions. so like, don't come for them if you're on ancient tech, they simply weren't invited to that party π
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. absolute legends, fr fr π«‘π
β SEE ALSO β
ncurses(3NCURSES) and related pages whose names begin βmenu_β for detailed descriptions of the entry points. go read those if you want the deep lore πβ¨
and that's the whole page bestie β this was ncurses 6.6, dated 2024-03-16 π now go make your menus pretty, you've got this ππ
π¦ where this page comes from
- ubuntu resolute: ncurses-doc 6.6+20251231-1 Β· MIT/X11
- ubuntu stonking: ncurses-doc 6.6+20260608-2 Β· MIT/X11
- 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