---
name: "menu_opts"
section: "3x"
platform: "linux"
package: "ncurses"
version: "6.6-2"
release: "Arch Linux 2026-11-01"
platforms: ["linux", "macos"]
url: "https://new.carta.tech/menu_opts/3x"
---

# menu\_opts(3x)

set and get menu options

## 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***);**

## 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.**

- **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.**

## 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(3)](/errno/3.md)).**

- **E\_POSTED**

  **The menu is already posted.**

## 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.**

## SEE ALSO

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