Implement reactive-rendering for text_input

... and fix the redraw queue logic in `iced_winit`.
This commit is contained in:
Héctor Ramón Jiménez 2024-10-22 02:50:46 +02:00
parent 3ba7c71e3f
commit 52490397d6
No known key found for this signature in database
GPG key ID: 4C07CEC81AFA161F
4 changed files with 201 additions and 88 deletions

View file

@ -2,13 +2,13 @@
use crate::text_input::Value;
/// The cursor of a text input.
#[derive(Debug, Copy, Clone)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub struct Cursor {
state: State,
}
/// The state of a [`Cursor`].
#[derive(Debug, Copy, Clone)]
#[derive(Debug, Copy, Clone, PartialEq, Eq)]
pub enum State {
/// Cursor without a selection
Index(usize),