Content

Forms

Own and align a bounded set of labeled single-line text inputs.

Generated previewCharm
Dedicated Forms example rendered in the Charm skin

The site build compiles the dedicated Ada component example, constructs Forms through its public API, and exports that exact styled surface. Read the capture source.

When to use it

Use a form to collect several related text values with aligned labels and one active field.

State and ownership

The Flyology_TUI.Components.Forms package defines this component.

The form owns each text-input child model, active field, submitted and cancelled status, and responsive input width. Field values remain available by index.

  • The application model owner applies updates during serial event dispatch.
  • Appearance and skin values are borrowed only while the component renders.

Input and updates

The form routes keyboard and local mouse input to its active text input. Enter submits, Escape cancels, and Tab changes the active field.

Integration sequence

  1. Create the form from bounded field definitions and a responsive input width.
  2. Pass terminal keyboard or form-local mouse events to Update; read submitted, cancelled, field-value, and cursor queries from the form model.
  3. Render the form with the current appearance, and place its returned surface in the application layout.

See the linked package reference for its exact declarations and contracts.

Responsive and accessible behavior

  • Use dimensions and regions from the current layout or presentation value.
  • When a component owns mouse capture, route its matching release even when the pointer leaves the original bounds.
  • Retain a glyph, label, border, or text-attribute cue when the terminal reduces color.