summaryrefslogtreecommitdiffstats
path: root/native/src/widget/button.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-07-28 03:53:47 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2022-07-28 03:53:47 +0200
commit52f84e51e90db1c324310565f2aff8b7e6987cba (patch)
tree721ef64dd91e0aca0e490971c8e1ee44ca912957 /native/src/widget/button.rs
parent80688689aa4b15bc23824df899974a9094a77b07 (diff)
downloadiced-52f84e51e90db1c324310565f2aff8b7e6987cba.tar.gz
iced-52f84e51e90db1c324310565f2aff8b7e6987cba.tar.bz2
iced-52f84e51e90db1c324310565f2aff8b7e6987cba.zip
Implement `Widget::operate` for `TextInput`
Diffstat (limited to 'native/src/widget/button.rs')
-rw-r--r--native/src/widget/button.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/native/src/widget/button.rs b/native/src/widget/button.rs
index 6eac6c1b..6c0b8f6e 100644
--- a/native/src/widget/button.rs
+++ b/native/src/widget/button.rs
@@ -8,6 +8,7 @@ use crate::overlay;
use crate::renderer;
use crate::touch;
use crate::widget::tree::{self, Tree};
+use crate::widget::Operation;
use crate::{
Background, Clipboard, Color, Element, Layout, Length, Padding, Point,
Rectangle, Shell, Vector, Widget,
@@ -164,6 +165,21 @@ where
)
}
+ fn operate(
+ &self,
+ tree: &mut Tree,
+ layout: Layout<'_>,
+ operation: &mut dyn Operation<Message>,
+ ) {
+ operation.container(None, &mut |operation| {
+ self.content.as_widget().operate(
+ &mut tree.children[0],
+ layout.children().next().unwrap(),
+ operation,
+ );
+ });
+ }
+
fn on_event(
&mut self,
tree: &mut Tree,