# screen_write_menu

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L771
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-screen_write_menu/

```c
void screen_write_menu(struct screen_write_ctx *ctx, struct menu *menu, int choice, enum box_lines lines, const struct grid_cell *menu_gc, const struct grid_cell *border_gc, const struct grid_cell *choice_gc)
```

## Parameters

- `ctx` (`struct screen_write_ctx *`)
- `menu` (`struct menu *`)
- `choice` (`int`)
- `lines` (`enum box_lines`)
- `menu_gc` (`const struct grid_cell *`)
- `border_gc` (`const struct grid_cell *`)
- `choice_gc` (`const struct grid_cell *`)

## Called by

- [`menu_draw_cb`](/en/tmux/latest/reference/c-function-menu_draw_cb/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/menu.c#L280)

## Calls

- [`format_draw`](/en/tmux/latest/reference/c-function-format_draw/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L808)
- [`screen_write_box`](/en/tmux/latest/reference/c-function-screen_write_box/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L786)
- [`screen_write_cursormove`](/en/tmux/latest/reference/c-function-screen_write_cursormove/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L792)
- [`screen_write_hline`](/en/tmux/latest/reference/c-function-screen_write_hline/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L793)
- [`screen_write_putc`](/en/tmux/latest/reference/c-function-screen_write_putc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L803)
- [`screen_write_set_cursor`](/en/tmux/latest/reference/c-function-screen-write-c-screen_write_set_cursor/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/screen-write.c#L817)

## Referenced declarations

- [`grid_cell.attr`](/en/tmux/latest/reference/c-struct-grid_cell-attr/) (attribute)
- [`box_lines`](/en/tmux/latest/reference/c-enum-box_lines/) (enum)
- [`menu.count`](/en/tmux/latest/reference/c-struct-menu-count/) (attribute)
- [`screen.cx`](/en/tmux/latest/reference/c-struct-screen-cx/) (attribute)
- [`screen.cy`](/en/tmux/latest/reference/c-struct-screen-cy/) (attribute)
- [`GRID_ATTR_DIM`](/en/tmux/latest/reference/c-define-tmux-h-grid_attr_dim/) (constant)
- [`grid_cell`](/en/tmux/latest/reference/c-struct-grid_cell/) (struct)
- [`menu.items`](/en/tmux/latest/reference/c-struct-menu-items/) (attribute)
- [`menu`](/en/tmux/latest/reference/c-struct-menu/) (struct)
- [`menu_item.name`](/en/tmux/latest/reference/c-struct-menu_item-name/) (attribute)
- [`screen_write_ctx.s`](/en/tmux/latest/reference/c-struct-screen_write_ctx-s/) (attribute)
- [`screen_write_ctx`](/en/tmux/latest/reference/c-struct-screen_write_ctx/) (struct)
- [`menu.title`](/en/tmux/latest/reference/c-struct-menu-title/) (attribute)
- [`menu.width`](/en/tmux/latest/reference/c-struct-menu-width/) (attribute)
