summaryrefslogtreecommitdiffstats
path: root/native/src/widget.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-08-18 03:37:32 +0200
committerLibravatar Héctor Ramón Jiménez <hector0193@gmail.com>2020-10-28 06:21:07 +0100
commitd328b07b3937c968fc8139f0b5c61903ebb893e7 (patch)
tree940ae9e93006ad4fdae2d86a2f70833ee99e0b10 /native/src/widget.rs
parent8a3ce90959e281cd73a7486d800df8d65478a698 (diff)
downloadiced-d328b07b3937c968fc8139f0b5c61903ebb893e7.tar.gz
iced-d328b07b3937c968fc8139f0b5c61903ebb893e7.tar.bz2
iced-d328b07b3937c968fc8139f0b5c61903ebb893e7.zip
Introduce `viewport` to `Widget::draw`
This should eventually allow us to only generate primitives that are visible.
Diffstat (limited to 'native/src/widget.rs')
-rw-r--r--native/src/widget.rs5
1 files changed, 4 insertions, 1 deletions
diff --git a/native/src/widget.rs b/native/src/widget.rs
index a10281df..8687ce6f 100644
--- a/native/src/widget.rs
+++ b/native/src/widget.rs
@@ -73,7 +73,9 @@ pub use text::Text;
#[doc(no_inline)]
pub use text_input::TextInput;
-use crate::{layout, overlay, Clipboard, Event, Hasher, Layout, Length, Point};
+use crate::{
+ layout, overlay, Clipboard, Event, Hasher, Layout, Length, Point, Rectangle,
+};
/// A component that displays information and allows interaction.
///
@@ -137,6 +139,7 @@ where
defaults: &Renderer::Defaults,
layout: Layout<'_>,
cursor_position: Point,
+ viewport: &Rectangle,
) -> Renderer::Output;
/// Computes the _layout_ hash of the [`Widget`].