---
name: "attribs"
section: "3menu"
platform: "linux"
package: "libncurses5-dev"
version: "5.0-6.0potato2"
release: "Debian 2.2 (Potato)"
platforms: ["linux"]
url: "https://new.carta.tech/attribs"
---

# attribs(3menu)

color and attribute control for menus

## NAME

**menu\_attributes** - color and attribute control for menus

## SYNOPSIS

**#include \<menu.h\>**\
 int set\_menu\_fore(MENU \*menu, chtype attr);\
 chtype menu\_fore(const MENU \*menu);\
 int set\_menu\_back(MENU \*menu, chtype attr);\
 chtype menu\_back(const MENU \*menu);\
 int set\_menu\_grey(MENU \*menu, chtype attr);\
 chtype menu\_grey(const MENU \*menu);\
 int set\_menu\_pad(MENU \*menu, int pad);\
 int menu\_pad(const MENU \*menu);\

## DESCRIPTION

The function **set\_menu\_fore** sets the foreground attribute of *menu*. This is the highlight used for selected menu items. **menu\_fore** returns the foreground attribute.  The default is **A\_STANDOUT**.

The function **set\_menu\_back** sets the background attribute of *menu*. This is the highlight used for selectable (but not currently selected) menu items.  The function **menu\_back** returns the background attribute.  The default is **A\_NORMAL**.

The function **set\_menu\_grey** sets the grey attribute of *menu*. This is the highlight used for un-selectable menu items in menus that permit more than one selection.  The function **menu\_grey** returns the grey attribute. The default is **A\_UNDERLINE**.

The function **set\_menu\_pad** sets the character used to fill the space between the name and description parts of a menu item.  **menu\_pad** returns the given menu's pad character.  The default is a blank.

## RETURN VALUE

These routines return one of the following:

- **E\_OK**

  The routine succeeded.

- **E\_SYSTEM\_ERROR**

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

- **E\_BAD\_ARGUMENT**

  Routine detected an incorrect or out-of-range argument.

## SEE ALSO

**ncurses**(3NCURSES) and 3X pages whose names begin "menu\_" for detailed descriptions of the entry points.

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