Skip to content

TabBarNode ​

Namespace: Hex1b.Nodes

Assembly: Hex1b.dll

Node representing a horizontal tab bar with overflow support. Renders tabs, arrow buttons for scrolling, and a dropdown for quick navigation.

csharp
public sealed class TabBarNode : Hex1bNode

Inheritance ​

Object → Hex1bNode → TabBarNode

Properties ​

CanScrollLeft ​

Whether the left arrow should be shown (can scroll left).

Returns: Boolean

csharp
public bool CanScrollLeft { get; }

CanScrollRight ​

Whether the right arrow should be shown (can scroll right).

Returns: Boolean

csharp
public bool CanScrollRight { get; }

NeedsOverflow ​

Whether the tab bar needs overflow controls (arrows and dropdown).

Returns: Boolean

csharp
public bool NeedsOverflow { get; }

Position ​

The position of tabs (affects rendering style).

Returns: TabPosition

csharp
public TabPosition Position { get; set; }

RenderMode ​

The rendering mode (Full or Compact).

Returns: TabBarRenderMode

csharp
public TabBarRenderMode RenderMode { get; set; }

ScrollOffset ​

Returns: Int32

csharp
public int ScrollOffset { get; set; }

SelectedIndex ​

Returns: Int32

csharp
public int SelectedIndex { get; set; }

SelectionChangedHandler ​

Handler for selection changes.

Returns: Func<TabSelectionChangedEventArgs, Task>

csharp
public Func<TabSelectionChangedEventArgs, Task>? SelectionChangedHandler { get; set; }

ShowPaging ​

Whether to show paging arrows when tabs overflow.

Returns: Boolean

csharp
public bool ShowPaging { get; set; }

ShowSelector ​

Whether to show the dropdown selector for quick tab navigation.

Returns: Boolean

csharp
public bool ShowSelector { get; set; }

Methods ​

ConfigureDefaultBindings(InputBindingsBuilder) ​

Configures the default input bindings for this node type. Override in derived classes to add default key bindings. These bindings can be inspected and modified by the user's callback.

Parameters:

csharp
public override void ConfigureDefaultBindings(InputBindingsBuilder bindings)

MeasureCore(Constraints) ​

Override this method to implement measuring logic for this node.

Parameters:

Returns: Size

csharp
protected override Size MeasureCore(Constraints constraints)

Render(Hex1bRenderContext) ​

Renders the node to the given context.

Parameters:

csharp
public override void Render(Hex1bRenderContext context)

SelectTabAsync(int) ​

Selects a tab by index and fires the selection changed event.

Parameters:

Returns: Task

csharp
public Task SelectTabAsync(int index)

Released under the MIT License.