[][src]Trait iced_native::widget::scrollable::Renderer

pub trait Renderer: Renderer + Sized {
    type Style: Default;
    fn scrollbar(
        &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
    ) -> Self::Output; }

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

type Style: Default

The style supported by this renderer.

Loading content...

Required methods

fn 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

Draws the Scrollable.

It receives:

Loading content...

Implementors

impl Renderer for Null[src]

type Style = ()

Loading content...