menu_win(3X)
π menu_win π
okay bestie, welcome to menu_win(3X) β yes that's the library-calls section of the manual, and yes this whole page is about making and breaking menu window and subwindow associations πͺβ¨
πΈ NAME πΈ
menu_win β make and break menu window and subwindow associations
π SYNOPSIS π
#include <menu.h>
int set_menu_win(MENU *menu, WINDOW *win);
WINDOW *menu_win(const MENU *menu);
int set_menu_sub(MENU *menu, WINDOW *sub);
WINDOW *menu_sub(const MENU *menu);
int scale_menu(const MENU *menu, int *rows, int *columns);
β¨ DESCRIPTION β¨
so every menu has a little duo of curses windows attached to it, like a main character and their bestie π«Ά
- the menu window shows any title and border that's associated with the window π
- the menu subwindow shows the items of the menu that are currently available for selection π
the first four functions get and set those windows. and no, you do not have to set either one β by default the driver code just uses stdscr for both. lowkey convenient, fr fr π
in the set_ functions:
- a window argument of
NULLis treated as though it werestsdcrπ - a
MENUargument ofNULLis treated as a request to change the system default menu window or subwindow π
and the function scale_menu returns the minimum size required for the subwindow of menu. it's giving "how much room do i need" energy π
π₯ RETURN VALUE π₯
routines that return pointers return NULL on error. routines that return an integer return one of these error codes, no cap:
E_OKβ the routine succeeded. slay πE_SYSTEM_ERRORβ system error occurred (seeerrno(3)). πE_BAD_ARGUMENTβ routine detected an incorrect or out-of-range argument πE_POSTEDβ the menu has already been posted πE_NOT_CONNECTEDβ no items are connected to the menu π
π PORTABILITY π
these routines emulate the System V menu library. they were not supported on Version 7 or BSD versions β so if you're on one of those, bestie, this is not the vibe π«
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond.
π¦ SEE ALSO π¦
curses(3X), curs_variables(3X), menu(3X)
and that's the whole page, periodt π this one came from ncurses 6.6, dated 2024-12-28 β so like, go forth and associate your windows, icon πβ¨
π¦ 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-2006,2010 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms