# window_tree_build_pane

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

```c
static void window_tree_build_pane(struct session *s, struct winlink *wl, struct window_pane *wp, void *modedata, struct mode_tree_item *parent)
```

## Parameters

- `s` (`struct session *`)
- `wl` (`struct winlink *`)
- `wp` (`struct window_pane *`)
- `modedata` (`void *`)
- `parent` (`struct mode_tree_item *`)

## Called by

- [`window_tree_build_window`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_build_window/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L293)

## Calls

- [`format_defaults`](/en/tmux/3.7c/reference/c-function-format_defaults/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L215)
- [`format_expand`](/en/tmux/3.7c/reference/c-function-format_expand/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L216)
- [`format_free`](/en/tmux/3.7c/reference/c-function-format_free/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L218)
- [`mode_tree_add`](/en/tmux/3.7c/reference/c-function-mode_tree_add/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L220)
- [`mode_tree_align`](/en/tmux/3.7c/reference/c-function-mode_tree_align/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L224)
- [`window_pane_index`](/en/tmux/3.7c/reference/c-function-window_pane_index/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L206)
- [`window_tree_add_item`](/en/tmux/3.7c/reference/c-function-window-tree-c-window_tree_add_item/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L208)
- [`xasprintf`](/en/tmux/3.7c/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/window-tree.c#L217)

## Other function references

- [`format_create`](/en/tmux/3.7c/reference/c-function-format_create/) (function)

## Referenced declarations

- [`window_tree_modedata.data`](/en/tmux/3.7c/reference/c-struct-window_tree_modedata-data/) (attribute)
- [`window_tree_modedata.format`](/en/tmux/3.7c/reference/c-struct-window_tree_modedata-format/) (attribute)
- [`FORMAT_PANE`](/en/tmux/3.7c/reference/c-define-tmux-h-format_pane/) (constant)
- [`session.id`](/en/tmux/3.7c/reference/c-struct-session-id/) (attribute)
- [`window_pane.id`](/en/tmux/3.7c/reference/c-struct-window_pane-id/) (attribute)
- [`winlink.idx`](/en/tmux/3.7c/reference/c-struct-winlink-idx/) (attribute)
- [`format_tree.item`](/en/tmux/3.7c/reference/c-struct-format_tree-item/) (attribute)
- [`mode_tree_item`](/en/tmux/3.7c/reference/c-struct-mode_tree_item/) (struct)
- [`mode_tree_item.name`](/en/tmux/3.7c/reference/c-struct-mode_tree_item-name/) (attribute)
- [`format_tree.s`](/en/tmux/3.7c/reference/c-struct-format_tree-s/) (attribute)
- [`session`](/en/tmux/3.7c/reference/c-struct-session/) (struct)
- [`mode_tree_item.text`](/en/tmux/3.7c/reference/c-struct-mode_tree_item-text/) (attribute)
- [`cmdq_item.type`](/en/tmux/3.7c/reference/c-struct-cmdq_item-type/) (attribute)
- [`window_pane`](/en/tmux/3.7c/reference/c-struct-window_pane/) (struct)
- [`WINDOW_TREE_PANE`](/en/tmux/3.7c/reference/c-enum-window_tree_type-window_tree_pane/) (constant)
- [`winlink`](/en/tmux/3.7c/reference/c-struct-winlink/) (struct)
- [`format_tree.wl`](/en/tmux/3.7c/reference/c-struct-format_tree-wl/) (attribute)
- [`format_tree.wp`](/en/tmux/3.7c/reference/c-struct-format_tree-wp/) (attribute)
