Expand description
Single-line text-input widget for the command line + omnibar.
Phase 3 chrome: a 28-px-tall strip docked to the top of the
window, drawn with a softbuffer-style &mut [u32] blit. Same
protocol as the statusline at the bottom of the window — caller
owns surface lifecycle, we just paint pixels.
§Layout
+---------------------------------------------------+
| : | open https://example.com | <- input row (28px)
+---------------------------------------------------+
| open open <url> | <- suggestion 1 (24px)
| back history back | <- suggestion 2 (24px)
| … |
+---------------------------------------------------+§Cursor blink
The widget exposes a InputBar::cursor_visible flag and the
caller is expected to flip it on a 500ms timer. We stay clock-free
so unit tests stay deterministic.
§Glyph coverage
The system font covers full Unicode; ASCII URLs work out of the box. A bitmap fallback activates when no suitable system font is found.
Structs§
- Input
Bar - Single-line text input + dropdown.
- Palette
- Colour palette for the input bar. Mirrors the statusline palette shape so a future theme system can wire both at once.
- Suggestion
- One suggestion row.
displayis what’s shown to the user;valueis what gets substituted into the buffer when the user confirms a selection (Enter or Tab).
Enums§
- Suggestion
Kind - What kind of suggestion is being rendered. Drives both the badge colour and the relative ordering (history < bookmark < command < search-engine fallback in the omnibar).
Constants§
- INPUT_
HEIGHT - Input strip height in pixels. Slightly taller than the statusline so it reads as a separate UI affordance — and so the glyph row has room for a 1-px focus border above and below.
- MAX_
SUGGESTIONS - Maximum suggestions rendered. Past this, callers should truncate their result set to avoid spilling off-screen.
- SUGGESTION_
ROW_ HEIGHT - Suggestion row height. Matches the statusline so a stack of rows reads as one cohesive overlay.