[][src]Trait iced_audio::h_slider::Renderer

pub trait Renderer: Renderer {
    type Style: Default;
    fn height(&self, style_sheet: &Self::Style) -> u16;
fn draw(
        &mut self,
        bounds: Rectangle,
        cursor_position: Point,
        normal: Normal,
        is_dragging: bool,
        style: &Self::Style
    ) -> Self::Output; }

The renderer of an HSlider.

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

Associated Types

type Style: Default

The style supported by this renderer.

Loading content...

Required methods

fn height(&self, style_sheet: &Self::Style) -> u16

returns the height of the HSlider

fn draw(
    &mut self,
    bounds: Rectangle,
    cursor_position: Point,
    normal: Normal,
    is_dragging: bool,
    style: &Self::Style
) -> Self::Output

Draws an HSlider.

It receives:

  • the bounds of the HSlider
  • the current cursor position
  • the current normal of the HSlider
  • the local state of the HSlider
  • the style of the ['HSlider']
Loading content...

Implementations on Foreign Types

impl Renderer for Renderer[src]

type Style = Box<dyn StyleSheet>

Loading content...

Implementors

Loading content...