menu\_post(3X) Library calls menu\_post(3X)

# [NAME](#NAME)

**post\_menu**, **unpost\_menu** - write or erase menus from associated subwindows

# [SYNOPSIS](#SYNOPSIS)

```
#include <menu.h>
```

```
int post_menu(MENU *menu);
int unpost_menu(MENU *menu);
```

# [DESCRIPTION](#DESCRIPTION)

The function **post\_menu** displays a menu to its associated subwindow. To trigger physical display of the subwindow, use [**refresh**(3X)](/man/os/ncurses/refresh.3X) or some equivalent **curses** routine (the implicit **doupdate** triggered by an **curses** input request will do). **post\_menu** resets the selection status of all items.

The function **unpost\_menu** erases menu from its associated subwindow.

# [RETURN VALUE](#RETURN_VALUE)

These routines return one of the following:

[**E\_OK**](#E_OK)

The routine succeeded.

[**E\_SYSTEM\_ERROR**](#E_SYSTEM_ERROR)

System error occurred (see [**errno**(3)](/man/os/ncurses/errno.3)).

[**E\_BAD\_ARGUMENT**](#E_BAD_ARGUMENT)

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

[**E\_POSTED**](#E_POSTED)

The menu has already been posted.

[**E\_BAD\_STATE**](#E_BAD_STATE)

Routine was called from an initialization or termination function.

[**E\_NO\_ROOM**](#E_NO_ROOM)

Menu is too large for its window. You should consider using **set\_menu\_format** to solve the problem.

[**E\_NOT\_POSTED**](#E_NOT_POSTED)

The menu has not been posted.

[**E\_NOT\_CONNECTED**](#E_NOT_CONNECTED)

No items are connected to the menu.

# [PORTABILITY](#PORTABILITY)

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

# [AUTHORS](#AUTHORS)

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

# [SEE ALSO](#SEE_ALSO)

[**curses**(3X)](/man/os/ncurses/curses.3X), [**menu**(3X)](/man/os/ncurses/menu.3X)

2024-03-16 ncurses 6.6

---

Document: unpost_menu(3x) from ncurses 6.6.20261024-r0 (Chainguard OS)
Source: https://github.com/ThomasDickey/ncurses-snapshots
