Skip to content
ConsoleMonster
Class

Outline

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Implements
IWidget
Modifiers
sealed

A list of headings to jump between: a table of contents, settings groups, the sections of a long form. The current entry (where the reader is) is marked and can follow a view as it scrolls; ↑/↓, Home/End and the wheel move the selection, and Enter or a click opens it. Opening makes the entry current, which is the control's value (so InputControl.Changed and OnChange report it), and leads to its OutlineItem.Target when it has one.

Inheritance

Usage

Explore 47 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

Accepted by parameters 24

Constructors

public Outline(string key) #

Creates an outline.

Parameters

key string required
The application-state key; its value is the current entry's title.

Properties

public IList<OutlineItem> Items { get; } #

The entries, in order. Configure them before the app runs.

public int CurrentIndex { get; set; } #

The index of the entry the reader is on, or -1. A view that scrolls sets it to follow the reading position; the selection follows it unless the outline has focus.

Extension Methods

public static Outline AddBinding(Outline outline, KeyBinding item) #

Adds an item to InputControl.Bindings: Keys that apply while this control has focus. They reach the control before its own keys (so Enter can open the selected row) and feed the app footer.

Parameters

outline ConsoleMonster.Interactive.Outline required
The instance.
item ConsoleMonster.Interactive.KeyBinding required
The item.

Returns

Outline The same instance.
AddBindings 2 overloads
public static Outline AddBindings(Outline outline, params KeyBinding[] items) #

Adds items to InputControl.Bindings: Keys that apply while this control has focus. They reach the control before its own keys (so Enter can open the selected row) and feed the app footer.

Parameters

outline ConsoleMonster.Interactive.Outline required
The instance.
items ConsoleMonster.Interactive.KeyBinding[] required
The items, in order.

Returns

Outline The same instance.
public static Outline AddBindings(Outline outline, IEnumerable<KeyBinding> items) #

Adds items to InputControl.Bindings: Keys that apply while this control has focus. They reach the control before its own keys (so Enter can open the selected row) and feed the app footer.

Parameters

outline ConsoleMonster.Interactive.Outline required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.KeyBinding> required
The items, in order.

Returns

Outline The same instance.
public static Outline AddItem(Outline outline, OutlineItem item) #

Adds an item to Outline.Items: The entries, in order. Configure them before the app runs.

Parameters

outline ConsoleMonster.Interactive.Outline required
The instance.
item ConsoleMonster.Interactive.OutlineItem required
The item.

Returns

Outline The same instance.
AddItems 2 overloads
public static Outline AddItems(Outline outline, params OutlineItem[] items) #

Adds items to Outline.Items: The entries, in order. Configure them before the app runs.

Parameters

outline ConsoleMonster.Interactive.Outline required
The instance.
items ConsoleMonster.Interactive.OutlineItem[] required
The items, in order.

Returns

Outline The same instance.
public static Outline AddItems(Outline outline, IEnumerable<OutlineItem> items) #

Adds items to Outline.Items: The entries, in order. Configure them before the app runs.

Parameters

outline ConsoleMonster.Interactive.Outline required
The instance.
items System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.OutlineItem> required
The items, in order.

Returns

Outline The same instance.
public static Outline CurrentIndex(Outline outline, int value) #

Sets Outline.CurrentIndex: The index of the entry the reader is on, or -1. A view that scrolls sets it to follow the reading position; the selection follows it unless the outline has focus.

Parameters

outline ConsoleMonster.Interactive.Outline required
The instance.
value int required
The value.

Returns

Outline The same instance.

Examples

// C# initializer or property    // C# fluent
outline.CurrentIndex = value;    outline.CurrentIndex(value);
Disabled 2 overloads
public static Outline Disabled(Outline outline, bool value) #

Sets InputControl.Disabled: Whether this control is excluded from input and focus traversal.

Parameters

outline ConsoleMonster.Interactive.Outline required
The instance.
value bool required
The value.

Returns

Outline The same instance.

Examples

// C# initializer or property    // C# fluent
outline.Disabled = value;        outline.Disabled(value);
public static Outline Disabled(Outline outline) #

Sets InputControl.Disabled to true.

Parameters

outline ConsoleMonster.Interactive.Outline required
The instance to configure.

Returns

Outline The same instance.
public static Outline Label(Outline outline, string? value) #

Sets InputControl.Label: The visible label, or null to use the name.

Parameters

outline ConsoleMonster.Interactive.Outline required
The instance.
value string? required
The value.

Returns

Outline The same instance.

Examples

// C# initializer or property    // C# fluent
outline.Label = value;           outline.Label(value);
public static Outline TabIndex(Outline outline, int value) #

Sets InputControl.TabIndex: Focus order; equal values preserve declaration order.

Parameters

outline ConsoleMonster.Interactive.Outline required
The instance.
value int required
The value.

Returns

Outline The same instance.

Examples

// C# initializer or property    // C# fluent
outline.TabIndex = value;        outline.TabIndex(value);
public static Outline ValidationMessage(Outline outline, string? value) #

Sets InputControl.ValidationMessage: The current validation message below the control, or null.

Parameters

outline ConsoleMonster.Interactive.Outline required
The instance.
value string? required
The value.

Returns

Outline The same instance.

Examples

// C# initializer or property         // C# fluent
outline.ValidationMessage = value;    outline.ValidationMessage(value);