summaryrefslogtreecommitdiffstats
path: root/core/src/overlay.rs
diff options
context:
space:
mode:
authorLibravatar Cory Forsstrom <cforsstrom18@gmail.com>2023-02-18 14:31:38 -0800
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2023-06-14 09:25:30 +0200
commit55dc3b5619392f4a20389255708c61082b3d4c1a (patch)
treec8b523def929a2e44be3535f5ae93ed494168ab7 /core/src/overlay.rs
parent329fbc7b2157b84183849b2e0f600eb039435aed (diff)
downloadiced-55dc3b5619392f4a20389255708c61082b3d4c1a.tar.gz
iced-55dc3b5619392f4a20389255708c61082b3d4c1a.tar.bz2
iced-55dc3b5619392f4a20389255708c61082b3d4c1a.zip
Introduce internal `overlay::Nested` for `UserInterface`
Diffstat (limited to 'core/src/overlay.rs')
-rw-r--r--core/src/overlay.rs16
1 files changed, 15 insertions, 1 deletions
diff --git a/core/src/overlay.rs b/core/src/overlay.rs
index 1fa994e4..2e05db93 100644
--- a/core/src/overlay.rs
+++ b/core/src/overlay.rs
@@ -91,9 +91,23 @@ where
///
/// By default, it returns true if the bounds of the `layout` contain
/// the `cursor_position`.
- fn is_over(&self, layout: Layout<'_>, cursor_position: Point) -> bool {
+ fn is_over(
+ &self,
+ layout: Layout<'_>,
+ _renderer: &Renderer,
+ cursor_position: Point,
+ ) -> bool {
layout.bounds().contains(cursor_position)
}
+
+ /// Returns the nested overlay of the [`Overlay`], if there is any.
+ fn overlay<'a>(
+ &'a mut self,
+ _layout: Layout<'_>,
+ _renderer: &Renderer,
+ ) -> Option<Element<'a, Message, Renderer>> {
+ None
+ }
}
/// Returns a [`Group`] of overlay [`Element`] children.