diff options
author | 2022-11-11 08:43:36 -0800 | |
---|---|---|
committer | 2022-11-11 08:43:36 -0800 | |
commit | c4bca3f2af7ae9b2c8dfc3af48ab73dad852ed34 (patch) | |
tree | a9c75de888366ea4d0f82c821e6d90a7682ae380 /native/src/widget/operation.rs | |
parent | 23299a555f8b7e908a6a14915307792a7cf97b9a (diff) | |
download | iced-c4bca3f2af7ae9b2c8dfc3af48ab73dad852ed34.tar.gz iced-c4bca3f2af7ae9b2c8dfc3af48ab73dad852ed34.tar.bz2 iced-c4bca3f2af7ae9b2c8dfc3af48ab73dad852ed34.zip |
Add text input operations
Diffstat (limited to 'native/src/widget/operation.rs')
-rw-r--r-- | native/src/widget/operation.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/native/src/widget/operation.rs b/native/src/widget/operation.rs index 2b1179f1..a0aa4117 100644 --- a/native/src/widget/operation.rs +++ b/native/src/widget/operation.rs @@ -1,9 +1,11 @@ //! Query or update internal widget state. pub mod focusable; pub mod scrollable; +pub mod text_input; pub use focusable::Focusable; pub use scrollable::Scrollable; +pub use text_input::TextInput; use crate::widget::Id; @@ -28,6 +30,9 @@ pub trait Operation<T> { /// Operates on a widget that can be scrolled. fn scrollable(&mut self, _state: &mut dyn Scrollable, _id: Option<&Id>) {} + /// Operates on a widget that has text input. + fn text_input(&mut self, _state: &mut dyn TextInput, _id: Option<&Id>) {} + /// Finishes the [`Operation`] and returns its [`Outcome`]. fn finish(&self) -> Outcome<T> { Outcome::None |