Skip to content
ConsoleMonster
Class

DocumentViewer

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Implements
IWidget
Modifiers
sealed

Browses a widget or a tabbed document inside an application layout.

Inheritance

Usage

Explore 29 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 14

Constructors

DocumentViewer 2 overloads
public DocumentViewer(string key, IWidget widget) #

Creates a viewer over a widget. A Markdown or help widget supplies its heading structure.

Parameters

key string required
The application-state key.
widget ConsoleMonster.Layout.IWidget required
The content to browse.
public DocumentViewer(string key, IEnumerable<DocumentViewerPart> parts) #

Creates a viewer with named parts in display order.

Parameters

key string required
The application-state key.
parts System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.DocumentViewerPart> required
The document parts, at least one.

Properties

public int Height { get; set; } #

The natural content height in rows; a containing layout can allocate a different height.

public string? SectionTitle { get; } #

The current heading, or null in an unheaded part of the document.

Extension Methods

public static DocumentViewer Binding(DocumentViewer documentViewer, 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

documentViewer ConsoleMonster.Interactive.DocumentViewer required
The instance.
item ConsoleMonster.Interactive.KeyBinding required
The item.

Returns

DocumentViewer The same instance.
public static DocumentViewer Bindings(DocumentViewer documentViewer, 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

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

Returns

DocumentViewer The same instance.
public static DocumentViewer Disabled(DocumentViewer documentViewer, bool value = true) #

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

Parameters

documentViewer ConsoleMonster.Interactive.DocumentViewer required
The instance.
value bool = true optional
The value; true when omitted.

Returns

DocumentViewer The same instance.

Examples

// C# initializer or property       // C# fluent
documentViewer.Disabled = value;    documentViewer.Disabled(value);
public static DocumentViewer Height(DocumentViewer documentViewer, int value) #

Sets DocumentViewer.Height: The natural content height in rows; a containing layout can allocate a different height.

Parameters

documentViewer ConsoleMonster.Interactive.DocumentViewer required
The instance.
value int required
The value.

Returns

DocumentViewer The same instance.

Examples

// C# initializer or property     // C# fluent
documentViewer.Height = value;    documentViewer.Height(value);
public static DocumentViewer Label(DocumentViewer documentViewer, string? value) #

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

Parameters

documentViewer ConsoleMonster.Interactive.DocumentViewer required
The instance.
value string? required
The value.

Returns

DocumentViewer The same instance.

Examples

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

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

Parameters

documentViewer ConsoleMonster.Interactive.DocumentViewer required
The instance.
value int required
The value.

Returns

DocumentViewer The same instance.

Examples

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

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

Parameters

documentViewer ConsoleMonster.Interactive.DocumentViewer required
The instance.
value string? required
The value.

Returns

DocumentViewer The same instance.

Examples

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