menu_post(3X)

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

πŸ’… menu_post β€” bestie, it's giving "put the menu on the screen"

ok so this page is from menu_post(3X), filed under Library calls, and it's all about post_menu and unpost_menu β€” the two functions that literally make your menu show up or go away. slay. ✨


πŸŽ€ SYNOPSIS πŸŽ€

#include <menu.h>

int post_menu(MENU *menu);
int unpost_menu(MENU *menu);

two functions, one header, zero drama. 🫢


🌸 DESCRIPTION 🌸

πŸ’– post_menu

post_menu displays a menu to its associated subwindow. that's it, that's the vibe.

⭐ important bestie note: posting the menu doesn't automatically paint the subwindow on the physical screen. to trigger physical display of the subwindow you gotta use refresh(3X) or some equivalent curses routine β€” and yes, the implicit doupdate triggered by a curses input request will do the job too. iykyk.

also, post_menu resets the selection status of all items. every single one. fresh start, main character energy. πŸ”₯

πŸ¦‹ unpost_menu

unpost_menu erases menu from its associated subwindow. bye bye, menu. πŸŽ€


✨ RETURN VALUE ✨

these routines return one of the following, and you WILL check them, ok?

  • E_OK β€” the routine succeeded. ate. πŸ‘‘
  • E_SYSTEM_ERROR β€” system error occurred (see errno(3)). πŸ’€
  • E_BAD_ARGUMENT β€” routine detected an incorrect or out-of-range argument. the audacity.
  • E_POSTED β€” the menu has already been posted. it's already up there, bestie, chill.
  • E_BAD_STATE β€” routine was called from an initialization or termination function. wrong place, wrong time 😭
  • E_NO_ROOM β€” menu is too large for its window. you should consider using set_menu_format to solve the problem. it's giving "doesn't fit" πŸ™ˆ
  • E_NOT_POSTED β€” the menu has not been posted. nothing to unpost, nothing to see.
  • E_NOT_CONNECTED β€” no items are connected to the menu. an empty menu is not the serve you think it is.

🌈 PORTABILITY 🌈

these routines emulate the System V menu library. they were not supported on Version 7 or BSD versions β€” so don't come for them if you're on ancient territory, ngl.


πŸ‘‘ AUTHORS πŸ‘‘

Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. legends, fr fr. 🫢


πŸ“ SEE ALSO πŸ“

  • curses(3X)
  • menu(3X)

mwah πŸ’‹ that's the whole page β€” this was ncurses 6.5, dated 2024-03-16, and menu_post(3X) is officially done. go post your menu, bestie. πŸ’…βœ¨

πŸ“¦ where this page comes from