Table of Contents

Class FocusScope

Namespace
MiniTui
Assembly
MiniTui.dll

The focusable children of a component, in tab order (§9.2). The focus chain starts at the top screen and follows Focused from each component until it reaches one whose scope is empty.

public sealed class FocusScope
Inheritance
FocusScope
Inherited Members

Properties

Count

How many members the scope has.

public int Count { get; }

Property Value

int

Focused

The focused member: the first one added, until focus moves. Null when the scope is empty.

public Component? Focused { get; }

Property Value

Component

Methods

Add(Component)

Add a member. Tab order is add order.

public FocusScope Add(Component child)

Parameters

child Component

Returns

FocusScope

Exceptions

InvalidOperationException

child isn't a child of the scope's owner.

Focus(Component)

Focus a member.

public void Focus(Component child)

Parameters

child Component

Exceptions

InvalidOperationException

child isn't in the scope.

IsFocused(Component)

True if child is the focused member.

public bool IsFocused(Component child)

Parameters

child Component

Returns

bool

Next()

Focus the next member, wrapping around.

public void Next()

Previous()

Focus the previous member, wrapping around.

public void Previous()