# `MingaEditor.Shell.Traditional.TabBarRenderer`
[🔗](https://github.com/jsmestad/minga/blob/main/lib/minga_editor/shell/traditional/tab_bar_renderer.ex#L1)

Renders the tab bar at the top of the screen.

Produces a list of draw commands for row 0 and a list of click regions
for mouse hit-testing, following the same segment pattern as the
modeline renderer.

Uses Powerline slant separators between tabs and handles overflow when
tabs exceed the terminal width by scrolling to keep the active tab
visible.

## Close button behavior

Each tab reserves space for a close icon ("✕"). The icon is visible on
the active tab always, and on inactive tabs only when the mouse hovers
over that tab's region. When hidden, the reserved space renders as
blank (fg matches bg). Tab widths are stable regardless of hover state.

# `click_region`

```elixir
@type click_region() ::
  {col_start :: non_neg_integer(), col_end :: non_neg_integer(),
   command :: atom()}
```

A clickable region: column range mapping to a command.

# `render`

```elixir
@spec render(
  non_neg_integer(),
  pos_integer(),
  MingaEditor.State.TabBar.t(),
  MingaEditor.UI.Theme.t(),
  non_neg_integer() | nil
) :: {[MingaEditor.DisplayList.draw()], [click_region()]}
```

Renders the tab bar at the given row.

`hover_col` is the mouse column if the mouse is hovering on the tab bar
row, or `nil` if not hovering. Used to determine which inactive tab (if
any) should reveal its close button.

Returns `{draw_commands, click_regions}`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
