You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We need a widget to ask users for text input. This seems to be a highly interactive widget that may pose a real challenge. We could start simple and forget about text selection, copy, cut, paste, etc.
Here are a couple of challenges that I see:
Choosing where to place the input cursor based on a mouse click. I am not sure if we will have to contribute additional functionality to glyph-brush to get this working properly.
Clipping text when it does not fit inside the input. Maybe we could use a Canvas to emulate it, but it may be tricky with the current Widget API. We may need to change it in order to make rendering more composable.
This is the kind of API I would personally like:
pubenumMessage{TextChanged(String),}let state = &mut text_input::State::new();let value = String::from("Some text!");TextInput::new(state,&value).on_change(Message::TextChanged);
The text was updated successfully, but these errors were encountered:
I'm working on a POC, with very limited features. See here. It is a simple Text which able to send message when "selected" on click. Question: Is it possible to know when a Text is clicked from "user" code (get the layout/bindings in fine) ?
I implemented a TextInput widget in iced in this PR: iced-rs/iced#37. iced is a standalone crate based on the current ui module in coffee. The widget implementation should be similar between both crates, so you may find the PR useful!
We should eventually use iced for the ui module in coffee. I started working on this in #88, but iced has changed quite a bit since then.
We need a widget to ask users for text input. This seems to be a highly interactive widget that may pose a real challenge. We could start simple and forget about text selection, copy, cut, paste, etc.
Here are a couple of challenges that I see:
glyph-brush
to get this working properly.Canvas
to emulate it, but it may be tricky with the currentWidget
API. We may need to change it in order to make rendering more composable.This is the kind of API I would personally like:
The text was updated successfully, but these errors were encountered: