Skip to main content

SliderTrackShape

Trait SliderTrackShape 

Source
pub trait SliderTrackShape {
    // Required method
    fn paint(
        &self,
        scene: &mut Scene,
        track: Rect,
        thumbs: &[f32],
        secondary: Option<f32>,
        paint: &SliderPaint<'_>,
    );
}
Expand description

Paints a slider’s track: the reference’s SliderTrackShape and RangeSliderTrackShape in one.

Required Methods§

Source

fn paint( &self, scene: &mut Scene, track: Rect, thumbs: &[f32], secondary: Option<f32>, paint: &SliderPaint<'_>, )

Paints the track along track — the travel, inset in the slider’s box, as tall as the theme’s track height — with the thumbs’ centres across at thumbs: one for a slider, the start and the end for a range slider. secondary is where a slider’s secondary value lies, if it has one.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§