Introduce internal overlay::Nested for UserInterface

This commit is contained in:
Cory Forsstrom 2023-02-18 14:31:38 -08:00 committed by Héctor Ramón Jiménez
parent 329fbc7b21
commit 55dc3b5619
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
9 changed files with 406 additions and 41 deletions

View file

@ -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.