[−][src]Trait iced_native::widget::scrollable::Renderer
The renderer of a Scrollable
.
Your renderer will need to implement this trait before being
able to use a Scrollable
in your user interface.
Associated Types
Loading content...Required methods
fn scrollbar(
&self,
bounds: Rectangle,
content_bounds: Rectangle,
offset: u32
) -> Option<Scrollbar>
&self,
bounds: Rectangle,
content_bounds: Rectangle,
offset: u32
) -> Option<Scrollbar>
Returns the Scrollbar
given the bounds and content bounds of a
Scrollable
.
fn draw(
&mut self,
scrollable: &State,
bounds: Rectangle,
content_bounds: Rectangle,
is_mouse_over: bool,
is_mouse_over_scrollbar: bool,
scrollbar: Option<Scrollbar>,
offset: u32,
style: &Self::Style,
content: Self::Output
) -> Self::Output
&mut self,
scrollable: &State,
bounds: Rectangle,
content_bounds: Rectangle,
is_mouse_over: bool,
is_mouse_over_scrollbar: bool,
scrollbar: Option<Scrollbar>,
offset: u32,
style: &Self::Style,
content: Self::Output
) -> Self::Output
Draws the Scrollable
.
It receives:
- the
State
of theScrollable
- the bounds of the
Scrollable
widget - the bounds of the
Scrollable
content - whether the mouse is over the
Scrollable
or not - whether the mouse is over the
Scrollbar
or not - a optional
Scrollbar
to be rendered - the scrolling offset
- the drawn content
Implementors
impl Renderer for Null
[src]
type Style = ()
fn scrollbar(
&self,
_bounds: Rectangle,
_content_bounds: Rectangle,
_offset: u32
) -> Option<Scrollbar>
[src]
&self,
_bounds: Rectangle,
_content_bounds: Rectangle,
_offset: u32
) -> Option<Scrollbar>
fn draw(
&mut self,
_scrollable: &State,
_bounds: Rectangle,
_content_bounds: Rectangle,
_is_mouse_over: bool,
_is_mouse_over_scrollbar: bool,
_scrollbar: Option<Scrollbar>,
_offset: u32,
_style: &Self::Style,
_content: Self::Output
)
[src]
&mut self,
_scrollable: &State,
_bounds: Rectangle,
_content_bounds: Rectangle,
_is_mouse_over: bool,
_is_mouse_over_scrollbar: bool,
_scrollbar: Option<Scrollbar>,
_offset: u32,
_style: &Self::Style,
_content: Self::Output
)