Implement Widget::draw for Scrollable

Rendering the scroller is still WIP
This commit is contained in:
Héctor Ramón Jiménez 2021-10-14 17:15:29 +07:00
parent 7c4738735b
commit dfceee99aa
No known key found for this signature in database
GPG key ID: 140CC052C94F138E
5 changed files with 122 additions and 50 deletions

View file

@ -10,7 +10,7 @@ use crate::slider;
use crate::text;
use crate::text_input;
use crate::toggler;
use crate::{Font, Padding, Point, Rectangle, Size};
use crate::{Font, Padding, Point, Rectangle, Size, Vector};
/// A renderer that does nothing.
///
@ -28,7 +28,13 @@ impl Null {
impl Renderer for Null {
type Defaults = ();
fn with_layer(&mut self, _bounds: Rectangle, _f: impl FnOnce(&mut Self)) {}
fn with_layer(
&mut self,
_bounds: Rectangle,
_offset: Vector<u32>,
_f: impl FnOnce(&mut Self),
) {
}
fn clear(&mut self) {}
}