summaryrefslogtreecommitdiffstats
path: root/native/src/widget.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-04-14 12:11:10 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-07-08 10:34:14 +0200
commitc901f40fd6c5aa39f4dc056b2b59bc7133b287e6 (patch)
treeef71165b0c0958e517ccac0e234cbb20aa385afa /native/src/widget.rs
parent5c4f5ae5ecb36703a95cafb2cd58692529c9466d (diff)
downloadiced-c901f40fd6c5aa39f4dc056b2b59bc7133b287e6.tar.gz
iced-c901f40fd6c5aa39f4dc056b2b59bc7133b287e6.tar.bz2
iced-c901f40fd6c5aa39f4dc056b2b59bc7133b287e6.zip
Introduce `Widget::overlay` :tada:
Diffstat (limited to 'native/src/widget.rs')
-rw-r--r--native/src/widget.rs8
1 files changed, 6 insertions, 2 deletions
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<Message, Renderer>
+pub trait Widget<'a, Message, Renderer>
where
Renderer: crate::Renderer,
{
@@ -175,4 +175,8 @@ where
_clipboard: Option<&dyn Clipboard>,
) {
}
+
+ fn overlay(&mut self) -> Option<Box<dyn Overlay<Message, Renderer> + 'a>> {
+ None
+ }
}