Module rat_widget::input
source · Expand description
Text input widget.
- Can do the usual insert/delete/movement operations.
- Text selection via keyboard and mouse.
- Scrolls with the cursor.
- Modes for focused and valid.
The visual cursor must be set separately after rendering. It is accessible as TextInputState::screen_cursor() after rendering.
Event handling by calling the freestanding fn handle_events. There’s handle_mouse_events if you want to override the default key bindings but keep the mouse behaviour.
Modules§
Structs§
- Text input widget.
- Textinput data & event-handling.
- Combined style for the widget.
Functions§
- Handle all events. Text events are only processed if focus is true. Mouse events are processed if they are in range.
- Handle only mouse-events.
- Handle only navigation events. Text events are only processed if focus is true. Mouse events are processed if they are in range.