---
name: "menu_opts"
section: "3x"
platform: "macos"
package: "ncurses"
version: "79"
release: "macOS 26.5"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/menu_opts/3x"
---

# menu\_opts(3x)

set and get menu options

## NAME

**menu\_opts** - set and get menu options

## SYNOPSIS

**#include \<menu.h\>**\
 int set\_menu\_opts(MENU \*menu, Menu\_Options opts);\
 int menu\_opts\_on(MENU \*menu, Menu\_Options opts);\
 int menu\_opts\_off(MENU \*menu, Menu\_Options opts);\
 Menu\_Options menu\_opts(const MENU \*menu);\

## DESCRIPTION

The function **set\_menu\_opts** sets all the given menu's option bits (menu option bits may be logically-OR'ed together).

The function **menu\_opts\_on** turns on the given option bits, and leaves others alone.

The function **menu\_opts\_off** turns off the given option bits, and leaves others alone.

The function **menu\_opts** returns the menu's current option bits.

The following options are defined (all are on by default):

- O\_ONEVALUE

  Only one item can be selected for this menu.

- O\_SHOWDESC

  Display the item descriptions when the menu is posted.

- O\_ROWMAJOR

  Display the menu in row-major order.

- O\_IGNORECASE

  Ignore the case when pattern-matching.

- O\_SHOWMATCH

  Move the cursor to within the item name while pattern-matching.

- O\_NONCYCLIC

  Don't wrap around next-item and previous-item, requests to the other end of the menu.

## RETURN VALUE

Except for **menu\_opts**, each routine returns one of the following:

- **E\_OK**

  The routine succeeded.

- **E\_SYSTEM\_ERROR**

  System error occurred (see **errno**).

- **E\_POSTED**

  The menu is already posted.

## SEE ALSO

**curses**(3X), **menu**(3X).

## NOTES

The header file **\<menu.h\>** automatically includes the header file **\<curses.h\>**.

## PORTABILITY

These routines emulate the System V menu library.  They were not supported on Version 7 or BSD versions.

## AUTHORS

Juergen Pfeifer.  Manual pages and adaptation for new curses by Eric S. Raymond.
