Editing
Text inputs
Edit one bounded Unicode line with a retained cursor and horizontal viewport.
The site build compiles the dedicated Ada component example, constructs Text inputs through its public API, and exports that exact styled surface. Read the capture source.
When to use it
Use a text input for names, filters, paths, and short commands that must remain on one line.
State and ownership
The Flyology_TUI.Components.Text_Inputs package defines this component.
The model retains bounded content, cursor, visible columns, focus, placeholder, and horizontal viewport. Appearance remains external.
- The application model owner applies updates during serial event dispatch.
- Appearance and skin values are borrowed only while the component renders.
Input and updates
Keyboard editing and paste operate on grapheme boundaries. A local left click focuses the input and places its cursor; the component does not implement drag selection or mouse capture.
Integration sequence
- Create the input with a bounded visible width and optional placeholder, then set or read its retained value through the model.
- Pass terminal keyboard or input-local left-click events to Update; use Cursor_Column to place the terminal cursor when focused.
- Render the input with content and placeholder appearances and place the returned one-row surface in the current 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.