summaryrefslogtreecommitdiffstats
path: root/native/src/renderer
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector0193@gmail.com>2020-07-16 05:00:37 +0200
committerLibravatar GitHub <noreply@github.com>2020-07-16 05:00:37 +0200
commitda5da3958e3b7fe85e371846a795c4ae05cb2df7 (patch)
treecd9f353e005ebc9c49d987125ba168a87982c629 /native/src/renderer
parent62ec03a0afe8566a8f0b06675990a83fd65de1a9 (diff)
parent31c30fedd5e5ad74cc1f66162d7e5c0e5e3cf420 (diff)
downloadiced-da5da3958e3b7fe85e371846a795c4ae05cb2df7.tar.gz
iced-da5da3958e3b7fe85e371846a795c4ae05cb2df7.tar.bz2
iced-da5da3958e3b7fe85e371846a795c4ae05cb2df7.zip
Merge pull request #444 from hecrj/feature/overlay
Overlay support and `PickList` widget
Diffstat (limited to '')
-rw-r--r--native/src/renderer.rs11
-rw-r--r--native/src/renderer/null.rs3
2 files changed, 13 insertions, 1 deletions
diff --git a/native/src/renderer.rs b/native/src/renderer.rs
index a16df72b..d986141f 100644
--- a/native/src/renderer.rs
+++ b/native/src/renderer.rs
@@ -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,13 @@ pub trait Renderer: Sized {
) -> layout::Node {
element.layout(self, limits)
}
+
+ /// Overlays the `overlay` output with the given bounds on top of the `base`
+ /// output.
+ fn overlay(
+ &mut self,
+ base: Self::Output,
+ overlay: Self::Output,
+ overlay_bounds: Rectangle,
+ ) -> Self::Output;
}
diff --git a/native/src/renderer/null.rs b/native/src/renderer/null.rs
index 580f58f8..07f79319 100644
--- a/native/src/renderer/null.rs
+++ b/native/src/renderer/null.rs
@@ -23,6 +23,9 @@ impl Null {
impl Renderer for Null {
type Output = ();
type Defaults = ();
+
+ fn overlay(&mut self, _base: (), _overlay: (), _overlay_bounds: Rectangle) {
+ }
}
impl column::Renderer for Null {