menu_format(3X)
π menu_format(3X) π
okay bestie, welcome to the menu_format(3X) page from the Library calls section β yes we're in the ncurses 6.6 cinematic universe and it's giving very demure, very mindful, very System V π
β¨ NAME β¨
set_menu_format, menu_format β set and get menu sizes π
πΈ SYNOPSIS πΈ
#include <menu.h>
int set_menu_format(MENU *menu, int rows, int cols);
void menu_format(const MENU *menu, int *rows, int *cols);
π¦ DESCRIPTION π¦
so set_menu_format is the one that sets the maximum display size of the menu you hand it. cute, right?
and like β if that size is too small to display all the menu items? the menu gets made scrollable. no cap, it just becomes scrollable. iconic behaviour honestly.
but if that size is larger than the menu's subwindow and the subwindow is too small to display all menu items, then post_menu will fail. π so like, be careful with that one.
the default format is 16 rows, 1 column. yes really. that's the vibe out of the box.
calling set_menu_format with a null menu pointer will change this default. π«Ά
and a zero row or column argument to set_menu_format is interpreted as a request not to change the current value β so it's like "no thoughts, keep it as is" β¨
menu_format is the chill getter: it returns the maximum-size constraints for the given menu into the storage addressed by rows and cols. π¦
β RETURN VALUE β
these routines return one of the following, bestie:
E_OKβ the routine succeeded. slay. πE_SYSTEM_ERRORβ a system error occurred (peeperrno(3)). πE_BAD_ARGUMENTβ the routine detected an incorrect or out-of-range argument. πE_POSTEDβ the menu is already posted. it's busy, it's booked, it cannot. πE_NOT_CONNECTEDβ no items are connected to the menu. it's giving empty group chat. π
π PORTABILITY π
these routines emulate the System V menu library. they were not supported on Version 7 or BSD versions. so like, if you were hoping for BSD energy here... nope, sorry bestie. π§
π AUTHORS π
Juergen Pfeifer. manual pages and adaptation for new curses by Eric S. Raymond. legends, fr fr. π
π₯ SEE ALSO π₯
curses(3X)menu(3X)
and that's the whole page, bestie!! this was ncurses 6.6, dated 2024-03-16, and yes the manual page name at the bottom is menu_format(3X) β go forth and format those menus, main character πβ¨π¦
π¦ 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-2015,2016 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms