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

pub trait Renderer: Renderer + Sized {
    type Style: Default;

    const DEFAULT_PADDING: u16;

    fn draw<Message>(
        &mut self,
        defaults: &Self::Defaults,
        bounds: Rectangle,
        cursor_position: Point,
        is_disabled: bool,
        is_pressed: bool,
        style: &Self::Style,
        content: &Element<'_, Message, Self>,
        content_layout: Layout<'_>
    ) -> Self::Output; }

The renderer of a Button.

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

Associated Types

type Style: Default

The style supported by this renderer.

Loading content...

Associated Constants

const DEFAULT_PADDING: u16

The default padding of a Button.

Loading content...

Required methods

fn draw<Message>(
    &mut self,
    defaults: &Self::Defaults,
    bounds: Rectangle,
    cursor_position: Point,
    is_disabled: bool,
    is_pressed: bool,
    style: &Self::Style,
    content: &Element<'_, Message, Self>,
    content_layout: Layout<'_>
) -> Self::Output

Draws a Button.

Loading content...

Implementors

impl Renderer for Null[src]

type Style = ()

Loading content...