summaryrefslogtreecommitdiffstats
path: root/native/src/widget/row.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/row.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/row.rs')
-rw-r--r--native/src/widget/row.rs19
1 files changed, 18 insertions, 1 deletions
diff --git a/native/src/widget/row.rs b/native/src/widget/row.rs
index c342c277..eda7c2d3 100644
--- a/native/src/widget/row.rs
+++ b/native/src/widget/row.rs
@@ -4,7 +4,7 @@ use crate::layout::{self, Layout};
use crate::mouse;
use crate::overlay;
use crate::renderer;
-use crate::widget::Tree;
+use crate::widget::{Operation, Tree};
use crate::{
Alignment, Clipboard, Element, Length, Padding, Point, Rectangle, Shell,
Widget,
@@ -130,6 +130,23 @@ where
)
}
+ fn operate(
+ &self,
+ tree: &mut Tree,
+ layout: Layout<'_>,
+ operation: &mut dyn Operation<Message>,
+ ) {
+ operation.container(None, &mut |operation| {
+ self.children
+ .iter()
+ .zip(&mut tree.children)
+ .zip(layout.children())
+ .for_each(|((child, state), layout)| {
+ child.as_widget().operate(state, layout, operation);
+ })
+ });
+ }
+
fn on_event(
&mut self,
tree: &mut Tree,