Table of Contents

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

count int

Properties

Count

How many tabs there were at the last draw.

public int Count { get; }

Property Value

int

Selected

The selected tab index. Clamped when drawn.

public int Selected { get; set; }

Property Value

int

Methods

HandleKey(ConsoleKeyInfo)

Handle ← → h l.

public bool HandleKey(ConsoleKeyInfo key)

Parameters

key ConsoleKeyInfo

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

mouse MouseEvent

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()