Class TabBarState
- Namespace
- MiniTui
- Assembly
- MiniTui.dll
The selected tab of a TabBarBuilder. The widget writes Count while drawing.
public sealed class TabBarState
- Inheritance
-
TabBarState
- Inherited Members
Constructors
TabBarState(int)
Create a state, optionally knowing the tab count before the first draw.
public TabBarState(int count = 0)
Parameters
countint
Properties
Count
How many tabs there were at the last draw.
public int Count { get; }
Property Value
Selected
The selected tab index. Clamped when drawn.
public int Selected { get; set; }
Property Value
Methods
HandleKey(ConsoleKeyInfo)
Handle ← → h l.
public bool HandleKey(ConsoleKeyInfo key)
Parameters
keyConsoleKeyInfo
Returns
- bool
True if the key changed or tried to change the tab.
HandleMouse(MouseEvent)
Handle a left press on a tab drawn last (1.x spec §4.8): select it.
public bool HandleMouse(MouseEvent mouse)
Parameters
mouseMouseEvent
Returns
- bool
True if the press hit a tab.
Next()
Select the next tab, stopping at the last.
public void Next()
Previous()
Select the previous tab, stopping at the first.
public void Previous()