menu_attributes(3X)

πŸ“¦ version 15.1, in freebsd 14.5, freebsd 15.1

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 (see errno(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