Class TabBarBuilder
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
A row of tabs. When they don't fit, the bar scrolls to keep the selected tab visible.
public sealed class TabBarBuilder
- Inheritance
-
TabBarBuilder
- Inherited Members
Methods
Draw(Buffer, Rect)
Draw the tabs on the first row, and a separator line on the second if there's room.
public void Draw(Buffer buf, Rect area)
Parameters
Focused(bool)
Use the focused style for the selected tab.
public TabBarBuilder Focused(bool focused = true)
Parameters
focusedbool
Returns
Hover(Vec2?)
The pointer, usually Hover. Hover is patched over the tab under it, unless it's the selected one (1.x spec §17.6).
public TabBarBuilder Hover(Vec2? position)
Parameters
positionVec2?
Returns
State(TabBarState)
The selected tab. The bar writes the tab count back.
public TabBarBuilder State(TabBarState state)
Parameters
stateTabBarState
Returns
Style(Style)
A style patched over the theme's tab styles.
public TabBarBuilder Style(Style style)
Parameters
styleStyle
Returns
Tab(string)
Add a tab.
public TabBarBuilder Tab(string label)
Parameters
labelstring
Returns
Tabs(params string[])
Add tabs.
public TabBarBuilder Tabs(params string[] labels)
Parameters
labelsstring[]