menu_opts(3X)

okay bestie, welcome to the menu options page of the ncurses manual (that's section 3X, library calls, iykyk) ✨ this is where you get and set all the lil toggles that control how your MENU behaves πŸŽ€


✨ NAME ✨

set_menu_opts, menu_opts_on, menu_opts_off, menu_opts β€” set and get menu options 🫢


🌸 SYNOPSIS 🌸

#include <menu.h>

int set_menu_opts(MENU *menu, Menu_Options opts);
Menu_Options menu_opts(const MENU *menu);

int menu_opts_on(MENU *menu, Menu_Options opts);
int menu_opts_off(MENU *menu, Menu_Options opts);

like, the whole squad right there πŸ‘‘


πŸ¦‹ DESCRIPTION πŸ¦‹

so here's the tea β˜•

The function set_menu_opts sets all the given menu's option bits β€” and bestie, menu option bits may be logically β€œor”-ed together, so go off, stack 'em πŸ’…

The function menu_opts_on turns on the given option bits, and leaves others alone. it's giving "no notes, everything else stays" ✨

The function menu_opts_off turns off the given option bits, and leaves others alone. same energy, opposite direction 😌

The function menu_opts returns the menu's current option bits. it's literally just telling you what's up 🫢

The following options are defined (and yes, all of them are on by default, every single one, no cap):

  • O_ONEVALUE β€” Only one item can be selected for this menu. monogamy menu, we love to see it πŸ’–
  • O_SHOWDESC β€” Display the item descriptions when the menu is posted. show off those little blurbs ✨
  • O_ROWMAJOR β€” Display the menu in row-major order. rows first, that's the vibe πŸ“
  • O_IGNORECASE β€” Ignore the case when pattern-matching. ABC and abc are the same girlie, fr fr 🌸
  • O_SHOWMATCH β€” Move the cursor to within the item name while pattern-matching. cursor said "lemme get a closer look" πŸ‘€
  • O_NONCYCLIC β€” Don't wrap around next-item and previous-item, requests to the other end of the menu. no looping, no little circles, we stop at the edge πŸ›‘
  • O_MOUSE_MENU β€” If user clicks with the mouse and it does not fall on the currently active menu, push KEY_MOUSE and the MEVENT data back on the queue to allow processing in another part of the calling program. like, hand that click back to somebody else, it's not mine to handle πŸ™ˆ

⭐ RETURN VALUE ⭐

Except for menu_opts, each routine returns one of the following:

  • E_OK β€” The routine succeeded. slay πŸ’…
  • E_SYSTEM_ERROR β€” System error occurred (see errno(3)). it's giving chaos 😭
  • E_POSTED β€” The menu is already posted. bestie it's busy, come back later πŸŽ€

🌈 PORTABILITY 🌈

These routines emulate the System V menu library. They were not supported on Version 7 or BSD versions. so like, know your era πŸ‘‘


πŸ‘‘ AUTHORS πŸ‘‘

Juergen Pfeifer. Manual pages and adaptation for new curses by Eric S. Raymond. absolute icons, both of them 🫢


πŸ”₯ SEE ALSO πŸ”₯

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

and that's the whole page, bestie!! this one's from ncurses 6.6, dated 2025-01-18, and it lives at menu_opts(3X) β€” go forth and toggle responsibly πŸ’–βœ¨πŸŽ€πŸ¦‹πŸŒΈπŸ’…

πŸ“¦ where this page comes from