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

pub trait Renderer: Renderer {
    type Style: Default;

    const DEFAULT_HEIGHT: u16;

    fn draw(
        &mut self,
        bounds: Rectangle,
        cursor_position: Point,
        range: RangeInclusive<f32>,
        value: f32,
        is_dragging: bool,
        style: &Self::Style
    ) -> Self::Output; }

The renderer of a Slider.

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

Associated Types

type Style: Default

The style supported by this renderer.

Loading content...

Associated Constants

const DEFAULT_HEIGHT: u16

The default height of a Slider.

Loading content...

Required methods

fn draw(
    &mut self,
    bounds: Rectangle,
    cursor_position: Point,
    range: RangeInclusive<f32>,
    value: f32,
    is_dragging: bool,
    style: &Self::Style
) -> Self::Output

Draws a Slider.

It receives:

  • the current cursor position
  • the bounds of the Slider
  • the local state of the Slider
  • the range of values of the Slider
  • the current value of the Slider
Loading content...

Implementors

impl Renderer for Null[src]

type Style = ()

Loading content...