Trait iced_audio::native::v_slider::Renderer[][src]

pub trait Renderer: Renderer {
    type Style: Default;
    fn draw(
        &mut self,
        bounds: Rectangle,
        cursor_position: Point,
        normal: Normal,
        is_dragging: bool,
        mod_range_1: Option<&ModulationRange>,
        mod_range_2: Option<&ModulationRange>,
        tick_marks: Option<&Group>,
        text_marks: Option<&Group>,
        style: &Self::Style,
        tick_marks_cache: &PrimitiveCache,
        text_marks_cache: &PrimitiveCache
    ) -> Self::Output; }

The renderer of a VSlider.

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

Associated Types

type Style: Default[src]

The style supported by this renderer.

Loading content...

Required methods

fn draw(
    &mut self,
    bounds: Rectangle,
    cursor_position: Point,
    normal: Normal,
    is_dragging: bool,
    mod_range_1: Option<&ModulationRange>,
    mod_range_2: Option<&ModulationRange>,
    tick_marks: Option<&Group>,
    text_marks: Option<&Group>,
    style: &Self::Style,
    tick_marks_cache: &PrimitiveCache,
    text_marks_cache: &PrimitiveCache
) -> Self::Output
[src]

Draws a VSlider.

It receives:

  • the bounds of the VSlider
  • the current cursor position
  • the current normal of the VSlider
  • the height of the handle in pixels
  • whether the slider is currently being dragged
  • any tick marks to display
  • any text marks to display
  • the style of the VSlider
Loading content...

Implementations on Foreign Types

impl<B: Backend> Renderer for Renderer<B>[src]

type Style = Box<dyn StyleSheet>

fn draw(
    &mut self,
    bounds: Rectangle,
    cursor_position: Point,
    normal: Normal,
    is_dragging: bool,
    mod_range_1: Option<&ModulationRange>,
    mod_range_2: Option<&ModulationRange>,
    tick_marks: Option<&Group>,
    text_marks: Option<&Group>,
    style_sheet: &Self::Style,
    tick_marks_cache: &PrimitiveCache,
    text_marks_cache: &PrimitiveCache
) -> Self::Output
[src]

Loading content...

Implementors

Loading content...