---
name: "mitem_opts"
section: "3menu"
platform: "linux"
package: "ncurses-doc"
version: "5.9+20140913-1+deb8u3"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/menu_opts/3menu"
---

# mitem\_opts(3menu)

set and get menu item options

Part of [menu\_opts(3menu)](/menu_opts/3menu.md).

## NAME

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

## SYNOPSIS

**#include \<menu.h\>**\
 int set\_item\_opts(ITEM \*item, Item\_Options opts);\
 int item\_opts\_on(ITEM \*item, Item\_Options opts);\
 int item\_opts\_off(ITEM \*item, Item\_Options opts);\
 Item\_Options item\_opts(const ITEM \*item);\

## DESCRIPTION

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

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

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

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

There is only one defined option bit mask, **O\_SELECTABLE**.  When this is on, the item may be selected during menu processing.  This option defaults to on.

## RETURN VALUE

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

- **E\_OK**

  The routine succeeded.

- **E\_SYSTEM\_ERROR**

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

## SEE ALSO

**ncurses**(3NCURSES), **menu**(3MENU).

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