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
Focused
The focused member: the first one added, until focus moves. Null when the scope is empty.
public Component? Focused { get; }
Property Value
Methods
Add(Component)
Add a member. Tab order is add order.
public FocusScope Add(Component child)
Parameters
childComponent
Returns
Exceptions
- InvalidOperationException
childisn't a child of the scope's owner.
Focus(Component)
Focus a member.
public void Focus(Component child)
Parameters
childComponent
Exceptions
- InvalidOperationException
childisn't in the scope.
IsFocused(Component)
True if child is the focused member.
public bool IsFocused(Component child)
Parameters
childComponent
Returns
Next()
Focus the next member, wrapping around.
public void Next()
Previous()
Focus the previous member, wrapping around.
public void Previous()