[][src]Trait coffee::ui::widget::slider::Renderer

pub trait Renderer {
    fn draw(
        &mut self,
        cursor_position: Point,
        bounds: Rectangle<f32>,
        state: &State,
        range: RangeInclusive<f32>,
        value: f32
    ) -> MouseCursor; }

The renderer of a Slider.

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

Required methods

fn draw(
    &mut self,
    cursor_position: Point,
    bounds: Rectangle<f32>,
    state: &State,
    range: RangeInclusive<f32>,
    value: f32
) -> MouseCursor

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

Loading content...