DocumentViewer
ConsoleMonster.Interactive
Browses a widget or a tabbed document inside an application layout.
Inheritance
- InputControl
- DocumentViewer
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.
Returned or exposed by 15
- Extension method DocumentViewer.Binding
- Extension method DocumentViewer.Bindings
- Extension method DocumentViewer.Disabled
- Extension method DocumentViewer.Height
- Extension method DocumentViewer.Label
- Extension method DocumentViewer.TabIndex
- Extension method DocumentViewer.ValidationMessage
- Method DocumentViewerFluent.Binding
- Method DocumentViewerFluent.Bindings
- Method DocumentViewerFluent.Disabled
- Method DocumentViewerFluent.Height
- Method DocumentViewerFluent.Label
- Method DocumentViewerFluent.TabIndex
- Method DocumentViewerFluent.ValidationMessage
- Method DocumentViewerInputOptions.Build
Accepted by parameters 14
- Extension method DocumentViewer.Binding
- Extension method DocumentViewer.Bindings
- Extension method DocumentViewer.Disabled
- Extension method DocumentViewer.Height
- Extension method DocumentViewer.Label
- Extension method DocumentViewer.TabIndex
- Extension method DocumentViewer.ValidationMessage
- Method DocumentViewerFluent.Binding
- Method DocumentViewerFluent.Bindings
- Method DocumentViewerFluent.Disabled
- Method DocumentViewerFluent.Height
- Method DocumentViewerFluent.Label
- Method DocumentViewerFluent.TabIndex
- Method DocumentViewerFluent.ValidationMessage
Constructors
public DocumentViewer(string key, IWidget widget) #Creates a viewer over a widget. A Markdown or help widget supplies its heading structure.
Parameters
- key string
- The application-state key.
- widget ConsoleMonster.Layout.IWidget
- The content to browse.
public DocumentViewer(string key, IEnumerable<DocumentViewerPart> parts) #Creates a viewer with named parts in display order.
Parameters
- key string
- The application-state key.
- parts System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.DocumentViewerPart>
- The document parts, at least one.
Inherited Methods
public bool HandleInput(InputEvent input, RenderContext context) #Parameters
- input InputEvent
- context RenderContext
Returns
boolpublic Size Measure(Constraints constraints, RenderContext context) #Parameters
- constraints Constraints
- context RenderContext
Returns
Sizepublic void Render(Region region, RenderContext context) #Parameters
- region Region
- context RenderContext
Properties
Inherited Properties
Inherited Events
public event EventHandler<AppValueChangedEventArgs>? Changed #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
- The instance.
- item ConsoleMonster.Interactive.KeyBinding
- The item.
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
- The instance.
- items System.Collections.Generic.IEnumerable<ConsoleMonster.Interactive.KeyBinding>
- The items, in order.
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
- The instance.
- value bool = true
- The value; true when omitted.
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
- The instance.
- value int
- The value.
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
- The instance.
- value string?
- The value.
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
- The instance.
- value int
- The value.
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
- The instance.
- value string?
- The value.
Examples
// C# initializer or property // C# fluent
documentViewer.ValidationMessage = value; documentViewer.ValidationMessage(value);