# window_tree_build_pane

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L294
- **Page:** https://libtmux.org/en/tmux/3.2a/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.2a/reference/c-function-window-tree-c-window_tree_build_window/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L391)

## Calls

- [`format_single`](/en/tmux/3.2a/reference/c-function-format_single/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L310)
- [`mode_tree_add`](/en/tmux/3.2a/reference/c-function-mode_tree_add/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L313)
- [`window_pane_index`](/en/tmux/3.2a/reference/c-function-window_pane_index/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L302)
- [`window_tree_add_item`](/en/tmux/3.2a/reference/c-function-window-tree-c-window_tree_add_item/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L304)
- [`xasprintf`](/en/tmux/3.2a/reference/c-function-xasprintf/) (function) [Call site](https://github.com/tmux/tmux/blob/3b929f332aafa7f1080eacc31feb11ffbb1d1841/window-tree.c#L311)

## Referenced declarations

- [`window_tree_modedata.data`](/en/tmux/3.2a/reference/c-struct-window_tree_modedata-data/) (attribute)
- [`window_tree_modedata.format`](/en/tmux/3.2a/reference/c-struct-window_tree_modedata-format/) (attribute)
- [`session.id`](/en/tmux/3.2a/reference/c-struct-session-id/) (attribute)
- [`window_pane.id`](/en/tmux/3.2a/reference/c-struct-window_pane-id/) (attribute)
- [`winlink.idx`](/en/tmux/3.2a/reference/c-struct-winlink-idx/) (attribute)
- [`mode_tree_item`](/en/tmux/3.2a/reference/c-struct-mode_tree_item/) (struct)
- [`window_tree_itemdata.pane`](/en/tmux/3.2a/reference/c-struct-window_tree_itemdata-pane/) (attribute)
- [`session`](/en/tmux/3.2a/reference/c-struct-session/) (struct)
- [`window_tree_itemdata.session`](/en/tmux/3.2a/reference/c-struct-window_tree_itemdata-session/) (attribute)
- [`window_tree_itemdata.type`](/en/tmux/3.2a/reference/c-struct-window_tree_itemdata-type/) (attribute)
- [`window_pane`](/en/tmux/3.2a/reference/c-struct-window_pane/) (struct)
- [`WINDOW_TREE_PANE`](/en/tmux/3.2a/reference/c-enum-window_tree_type-window_tree_pane/) (constant)
- [`window_tree_itemdata.winlink`](/en/tmux/3.2a/reference/c-struct-window_tree_itemdata-winlink/) (attribute)
- [`winlink`](/en/tmux/3.2a/reference/c-struct-winlink/) (struct)
