summaryrefslogtreecommitdiffstats
path: root/native/src/widget/operation.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2022-11-14 00:24:23 +0100
committerLibravatar GitHub <noreply@github.com>2022-11-14 00:24:23 +0100
commitf5c9f63329ec420757c81ef73ab76e7a8cb2cd2e (patch)
tree06cd44cdc5abfca94c1acfa10ab0281ae21c4b0c /native/src/widget/operation.rs
parent5f08b8d41ae2d749bd11068f103a0f8ce3abd7bf (diff)
parenta7a4a92466a4447f8d2e9b5ae2fc715ba6262de0 (diff)
downloadiced-f5c9f63329ec420757c81ef73ab76e7a8cb2cd2e.tar.gz
iced-f5c9f63329ec420757c81ef73ab76e7a8cb2cd2e.tar.bz2
iced-f5c9f63329ec420757c81ef73ab76e7a8cb2cd2e.zip
Merge pull request #1529 from tarkah/feat/text-input-operations
Add text input operations
Diffstat (limited to 'native/src/widget/operation.rs')
-rw-r--r--native/src/widget/operation.rs5
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