Skip to content
ConsoleMonster
Class

InputControl

ConsoleMonster.Interactive

Namespace
ConsoleMonster.Interactive
Assembly
ConsoleMonster
Implements
IWidget
Modifiers
abstract

A focusable layout control. Value edits and rendering are serialized; configuration is set before running.

Inheritance

  • object
  • InputControl

Derived Types

Usage

Explore 3 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 2

Accepted by parameters 1

Methods

public void Focus() #

Requests keyboard focus from the containing application.

public bool HandleInput(InputEvent input, RenderContext context) #

Applies one normalized input event.

Parameters

input ConsoleMonster.Input.InputEvent required
The input event.
context ConsoleMonster.Canvas.RenderContext required
The active render profile and theme.

Returns

bool Whether the control handled the event.
public Size Measure(Constraints constraints, RenderContext context) #

Returns the size the widget wants within the constraints.

Parameters

constraints ConsoleMonster.Layout.Constraints required
The space offered.
context ConsoleMonster.Canvas.RenderContext required
Profile, theme and glyphs.

Returns

Size The desired size, never larger than the constraints.
public void Render(Region region, RenderContext context) #

Renders into a region. The region may be smaller or larger than the measured size.

Parameters

region ConsoleMonster.Canvas.Region required
The target region.
context ConsoleMonster.Canvas.RenderContext required
Profile, theme and glyphs.

Properties

public string Name { get; } #

The state key used by the application.

public string? Label { get; set; } #

The visible label, or null to use the name.

public string? ValidationMessage { get; set; } #

The current validation message below the control, or null.

public int TabIndex { get; set; } #

Focus order; equal values preserve declaration order.

public bool Enabled { get; set; } #

Whether the control accepts input and participates in focus traversal.

public bool Focused { get; internal set; } #

Whether this control owns keyboard focus.

public object? CurrentValue { get; } #

The committed value, independent of the concrete control's value type.

Events

public event EventHandler<AppValueChangedEventArgs>? Changed #

Raised synchronously after a value changes, once per edit; caret-only movement does not change values.