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

pub trait Renderer: Renderer {
    type Style: Default;

    pub const DEFAULT_HEIGHT: u16;

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

The style supported by this renderer.

Loading content...

Associated Constants

pub const DEFAULT_HEIGHT: u16[src]

The default height of a Slider.

Loading content...

Required methods

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

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...