post(3MENU)
π post β bestie, let's put that menu on screen
okay so this is post(3MENU), a library call, and it's the glow-up moment for your menu β¨
πΈ NAME πΈ
post_menu, unpost_menu β write or erase menus from associated subwindows. that's it, that's the whole vibe: one puts the menu up, one takes it down π
π¦ SYNOPSIS π¦
#include <menu.h>
int post_menu(MENU *menu);
int unpost_menu(MENU *menu);
β¨ DESCRIPTION β¨
so post_menu displays a menu to its associated subwindow. that's the whole job, she's an icon, she serves π
but heads up bestie: to trigger the physical display of the subwindow, you gotta use refresh(3NCURSES) or some equivalent curses routine β and lowkey the implicit doupdate that gets triggered by a curses input request will do the trick too, no cap π«Ά
also post_menu resets the selection status of all items. every single one. fresh slate, new era, main character energy π
and then unpost_menu erases menu from its associated subwindow. bye bestie, you were gorgeous π
π₯ RETURN VALUE π₯
these routines return one of the following, and honestly, vibe check each one:
E_OKβ the routine succeeded. slay. iconic. no notes πE_SYSTEM_ERRORβ system error occurred (seeerrno(3)). not it πE_BAD_ARGUMENTβ routine detected an incorrect or out-of-range argument. girl what did you pass in πE_POSTEDβ the menu has already been posted. she's already up there, you can't post her twice, that's not how this works πE_BAD_STATEβ routine was called from an initialization or termination function. wrong place, wrong time, read the room πE_NO_ROOMβ menu is too large for its window. you should consider usingset_menu_formatto solve the problem. she does not fit, and that's a real problem, fr frE_NOT_POSTEDβ the menu has not been posted. there's nothing to unpost bestie, there's nothing there πE_NOT_CONNECTEDβ no items are connected to the menu. she's empty. she's got nothing going on. ghost town π
π PORTABILITY π
these routines emulate the System V menu library. they were not supported on Version 7 or BSD versions. so if you're kicking it old-school, sorry babe, she's not there π
π AUTHORS π
Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. legends, honestly, we love them for this π«Ά
π SEE ALSO π
ncurses(3NCURSES), menu(3MENU)
and that's the whole page, bestie!! brought to you by ncurses 6.6, dated 2024-03-16 β go post that menu, you absolute icon πβ¨π
π¦ 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-2016,2017 Free Software Foundation, Inc
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms