spacing(3MENU)
β¨ spacing(3MENU) β¨
okay bestie, we're doing the spacing page from the menu library π
it lives in section 3MENU and it's literally all about the vibes β the gaps, the breathing room, the personal space between your menu items π«Ά
πΈ NAME πΈ
set_menu_spacing, menu_spacing β set and get spacing between menu items. that's it, that's the whole job, and they ate π
π SYNOPSIS π
#include <menu.h>
int set_menu_spacing(MENU *menu,
int spc_description,
int spc_rows,
int spc_columns);
int menu_spacing(const MENU *menu,
int* spc_description,
int* spc_rows,
int* spc_columns);
like yes, four args each, we love a consistent queen π
π DESCRIPTION π
so set_menu_spacing is the one that sets the spacing info for the menu, and its parameters hand over the description and the size (in rows and columns). it's giving interior decorator energy ngl π¨
spc_descriptionβ controls the number of spaces between an item name and an item description. it must not be larger thanTABSIZE. the menu system puts the pad character right in the middle of this spacing area, and the leftover parts get filled with spaces. cute, right? β¨spc_rowsβ controls the number of rows that are used for an item. it must not be larger than3. the menu system inserts the blank lines between item rows, and those lines will contain the pad character in the appropriate positions. no cap π§spc_columnsβ controls the number of blanks between columns of items. it must not be larger thanTABSIZE. and listen β a value of0for all the spacing values resets them to the default, which is1for all of them. iconic reset behavior π
and then menu_spacing is the getter β it returns the spacing information for the menu. if a pointer is NULL, that corresponding bit of info is simply not returned. she respects boundaries π«Ά
π₯ RETURN VALUE π₯
both routines return E_OK on success, periodt.
set_menu_spacing may also return:
E_POSTEDif the menu is postedE_BAD_ARGUMENTif one of the spacing values is out of range
watch those ranges bestie, the library is NOT playing around π
π PORTABILITY π
these routines are specific to ncurses. they were not supported on Version 7, BSD or System V implementations. so it is recommended that any code depending on them be conditioned using NCURSES_VERSION. like, protect yourself, always π
π AUTHORS π
Juergen Pfeifer. manual pages and adaptation for new curses by Eric S. Raymond. absolute legends, we stan π
π SEE ALSO π
ncurses(3NCURSES)curses_variables(3NCURSES)menu(3MENU)
and that's the whole page, bestie π this one shipped in ncurses 6.6, dated 2024-12-28, so go forth and space your menu items beautifully β¨ spacing slay, no notes π
π¦ 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