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

pub trait Renderer: Renderer + Sized {
    type Style: Default;
    fn scrollbar(
        &self,
        bounds: Rectangle,
        content_bounds: Rectangle,
        offset: u32,
        scrollbar_width: u16,
        scrollbar_margin: u16,
        scroller_width: u16
    ) -> 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[src]

The style supported by this renderer.

Loading content...

Required methods

fn scrollbar(
    &self,
    bounds: Rectangle,
    content_bounds: Rectangle,
    offset: u32,
    scrollbar_width: u16,
    scrollbar_margin: u16,
    scroller_width: u16
) -> Option<Scrollbar>
[src]

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
[src]

Draws the Scrollable.

It receives:

Loading content...

Implementors

impl Renderer for Null[src]

type Style = ()

Loading content...