From c901f40fd6c5aa39f4dc056b2b59bc7133b287e6 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Tue, 14 Apr 2020 12:11:10 +0200 Subject: Introduce `Widget::overlay` :tada: --- native/src/widget.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'native/src/widget.rs') diff --git a/native/src/widget.rs b/native/src/widget.rs index 4453145b..dd1a97d2 100644 --- a/native/src/widget.rs +++ b/native/src/widget.rs @@ -67,7 +67,7 @@ pub use text::Text; #[doc(no_inline)] pub use text_input::TextInput; -use crate::{layout, Clipboard, Event, Hasher, Layout, Length, Point}; +use crate::{layout, Clipboard, Event, Hasher, Layout, Length, Overlay, Point}; /// A component that displays information and allows interaction. /// @@ -94,7 +94,7 @@ use crate::{layout, Clipboard, Event, Hasher, Layout, Length, Point}; /// [`geometry`]: https://github.com/hecrj/iced/tree/0.1/examples/geometry /// [`lyon`]: https://github.com/nical/lyon /// [`iced_wgpu`]: https://github.com/hecrj/iced/tree/0.1/wgpu -pub trait Widget +pub trait Widget<'a, Message, Renderer> where Renderer: crate::Renderer, { @@ -175,4 +175,8 @@ where _clipboard: Option<&dyn Clipboard>, ) { } + + fn overlay(&mut self) -> Option + 'a>> { + None + } } -- cgit