diff options
author | 2023-07-15 10:04:25 -0700 | |
---|---|---|
committer | 2023-07-15 10:04:25 -0700 | |
commit | 42c423b4a89613c4e1c552c891c1391a34837122 (patch) | |
tree | cd724464d59619f63ea24a0476cb342b0eca4caa /core/src | |
parent | e462f48a5a0b5023c3ca52e23698f5e9b25d86dd (diff) | |
download | iced-42c423b4a89613c4e1c552c891c1391a34837122.tar.gz iced-42c423b4a89613c4e1c552c891c1391a34837122.tar.bz2 iced-42c423b4a89613c4e1c552c891c1391a34837122.zip |
Add viewport to Widget::on_event
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/element.rs | 9 | ||||
-rw-r--r-- | core/src/widget.rs | 1 |
2 files changed, 7 insertions, 3 deletions
diff --git a/core/src/element.rs b/core/src/element.rs index 3268f14b..b9b76247 100644 --- a/core/src/element.rs +++ b/core/src/element.rs @@ -380,6 +380,7 @@ where renderer: &Renderer, clipboard: &mut dyn Clipboard, shell: &mut Shell<'_, B>, + viewport: &Rectangle, ) -> event::Status { let mut local_messages = Vec::new(); let mut local_shell = Shell::new(&mut local_messages); @@ -392,6 +393,7 @@ where renderer, clipboard, &mut local_shell, + viewport, ); shell.merge(local_shell, &self.mapper); @@ -511,10 +513,11 @@ where renderer: &Renderer, clipboard: &mut dyn Clipboard, shell: &mut Shell<'_, Message>, + viewport: &Rectangle, ) -> event::Status { - self.element - .widget - .on_event(state, event, layout, cursor, renderer, clipboard, shell) + self.element.widget.on_event( + state, event, layout, cursor, renderer, clipboard, shell, viewport, + ) } fn draw( diff --git a/core/src/widget.rs b/core/src/widget.rs index 79d86444..25c1cae8 100644 --- a/core/src/widget.rs +++ b/core/src/widget.rs @@ -115,6 +115,7 @@ where _renderer: &Renderer, _clipboard: &mut dyn Clipboard, _shell: &mut Shell<'_, Message>, + _viewport: &Rectangle, ) -> event::Status { event::Status::Ignored } |