# window_tree_draw_label

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L400
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-window-tree-c-window_tree_draw_label/

```c
static void window_tree_draw_label(struct screen_write_ctx *ctx, u_int px, u_int py, u_int sx, u_int sy, const struct grid_cell *gc, const char *label)
```

## Parameters

- `ctx` (`struct screen_write_ctx *`)
- `px` (`u_int`)
- `py` (`u_int`)
- `sx` (`u_int`)
- `sy` (`u_int`)
- `gc` (`const struct grid_cell *`)
- `label` (`const char *`)

## Called by

- [`window_tree_draw_session`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_draw_session/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L549)
- [`window_tree_draw_window`](/en/tmux/latest/reference/c-function-window-tree-c-window_tree_draw_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L686)

## Calls

- [`format_draw`](/en/tmux/latest/reference/c-function-format_draw/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L424)
- [`format_trim_left`](/en/tmux/latest/reference/c-function-format_trim_left/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L410)
- [`format_width`](/en/tmux/latest/reference/c-function-format_width/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L408)
- [`screen_write_box`](/en/tmux/latest/reference/c-function-screen_write_box/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L419)
- [`screen_write_clearcharacter`](/en/tmux/latest/reference/c-function-screen_write_clearcharacter/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L422)
- [`screen_write_cursormove`](/en/tmux/latest/reference/c-function-screen_write_cursormove/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L418)

## Referenced declarations

- [`BOX_LINES_DEFAULT`](/en/tmux/latest/reference/c-enum-box_lines-box_lines_default/) (constant)
- [`grid_cell`](/en/tmux/latest/reference/c-struct-grid_cell/) (struct)
- [`screen_write_ctx`](/en/tmux/latest/reference/c-struct-screen_write_ctx/) (struct)
