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

pub trait Renderer: Renderer + Renderer + Renderer + Sized {
    fn draw<Message>(
        &mut self,
        defaults: &Self::Defaults,
        content: &[(Pane, Content<'_, Message, Self>)],
        dragging: Option<(Pane, Point)>,
        resizing: Option<Axis>,
        layout: Layout<'_>,
        cursor_position: Point
    ) -> 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
    ) -> Self::Output;
fn draw_title_bar<Message>(
        &mut self,
        defaults: &Self::Defaults,
        bounds: Rectangle,
        style: &Self::Style,
        title: &str,
        title_size: u16,
        title_font: Self::Font,
        title_bounds: Rectangle,
        controls: Option<(&Element<'_, Message, Self>, Layout<'_>)>,
        cursor_position: Point
    ) -> 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.

Required methods

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

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
) -> Self::Output

Draws a Pane.

It receives:

fn draw_title_bar<Message>(
    &mut self,
    defaults: &Self::Defaults,
    bounds: Rectangle,
    style: &Self::Style,
    title: &str,
    title_size: u16,
    title_font: Self::Font,
    title_bounds: Rectangle,
    controls: Option<(&Element<'_, Message, Self>, Layout<'_>)>,
    cursor_position: Point
) -> Self::Output

Draws a TitleBar.

It receives:

  • the bounds, style of the TitleBar
  • the style of the TitleBar
  • the title of the TitleBar with its size, font, and bounds
  • the controls of the TitleBar with their [Layout+, if any
  • the cursor position
Loading content...

Implementors

impl Renderer for Null[src]

Loading content...