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

pub trait Renderer: Renderer + Renderer + Sized {
    type Style: Default;
    fn draw<Message>(
        &mut self,
        defaults: &Self::Defaults,
        content: &[(Pane, Content<'_, Message, Self>)],
        dragging: Option<(Pane, Point)>,
        resizing: Option<(Axis, Rectangle, bool)>,
        layout: Layout<'_>,
        style: &Self::Style,
        cursor_position: Point,
        viewport: &Rectangle
    ) -> Self::Output;
fn draw_pane<Message>(
        &mut self,
        defaults: &Self::Defaults,
        bounds: Rectangle,
        style: &Self::Style,
        title_bar: Option<(&TitleBar<'_, Message, Self>, Layout<'_>)>,
        body: (&Element<'_, Message, Self>, Layout<'_>),
        cursor_position: Point,
        viewport: &Rectangle
    ) -> Self::Output;
fn draw_title_bar<Message>(
        &mut self,
        defaults: &Self::Defaults,
        bounds: Rectangle,
        style: &Self::Style,
        content: (&Element<'_, Message, Self>, Layout<'_>),
        controls: Option<(&Element<'_, Message, Self>, Layout<'_>)>,
        cursor_position: Point,
        viewport: &Rectangle
    ) -> Self::Output; }

The renderer of a PaneGrid.

Your renderer will need to implement this trait before being able to use a PaneGrid in your user interface.

Associated Types

type Style: Default[src]

The style supported by this renderer.

Loading content...

Required methods

fn draw<Message>(
    &mut self,
    defaults: &Self::Defaults,
    content: &[(Pane, Content<'_, Message, Self>)],
    dragging: Option<(Pane, Point)>,
    resizing: Option<(Axis, Rectangle, bool)>,
    layout: Layout<'_>,
    style: &Self::Style,
    cursor_position: Point,
    viewport: &Rectangle
) -> Self::Output
[src]

Draws a PaneGrid.

It receives:

  • the elements of the PaneGrid
  • the Pane that is currently being dragged
  • the Axis that is currently being resized
  • the Layout of the PaneGrid and its elements
  • the cursor position

fn draw_pane<Message>(
    &mut self,
    defaults: &Self::Defaults,
    bounds: Rectangle,
    style: &Self::Style,
    title_bar: Option<(&TitleBar<'_, Message, Self>, Layout<'_>)>,
    body: (&Element<'_, Message, Self>, Layout<'_>),
    cursor_position: Point,
    viewport: &Rectangle
) -> Self::Output
[src]

Draws a Pane.

It receives:

fn draw_title_bar<Message>(
    &mut self,
    defaults: &Self::Defaults,
    bounds: Rectangle,
    style: &Self::Style,
    content: (&Element<'_, Message, Self>, Layout<'_>),
    controls: Option<(&Element<'_, Message, Self>, Layout<'_>)>,
    cursor_position: Point,
    viewport: &Rectangle
) -> Self::Output
[src]

Draws a TitleBar.

It receives:

Loading content...

Implementors

impl Renderer for Null[src]

type Style = ()

Loading content...