Introduce Layer trait
This commit is contained in:
parent
c901f40fd6
commit
f064f0482b
12 changed files with 252 additions and 54 deletions
|
|
@ -25,7 +25,7 @@ mod null;
|
|||
#[cfg(debug_assertions)]
|
||||
pub use null::Null;
|
||||
|
||||
use crate::{layout, Element};
|
||||
use crate::{layout, Element, Rectangle};
|
||||
|
||||
/// A component that can take the state of a user interface and produce an
|
||||
/// output for its users.
|
||||
|
|
@ -56,4 +56,11 @@ pub trait Renderer: Sized {
|
|||
) -> layout::Node {
|
||||
element.layout(self, limits)
|
||||
}
|
||||
|
||||
fn overlay(
|
||||
&mut self,
|
||||
base: Self::Output,
|
||||
overlay: Self::Output,
|
||||
overlay_bounds: Rectangle,
|
||||
) -> Self::Output;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue