Skip to main content

SliderTrait

Trait SliderTrait 

Source
pub trait SliderTrait {
    // Required method
    fn as_ptr(&self) -> *mut Slider;

    // Provided methods
    fn on_moved<F>(&self, handler: F)
       where F: FnMut(&EvSlider) + 'static { ... }
    fn tooltip(&self, text: &str) { ... }
    fn steps(&self, steps: u32) { ... }
    fn value(&self, value: f32) { ... }
    fn get_value(&self) -> f32 { ... }
}
Expand description

The slider trait.

Required Methods§

Source

fn as_ptr(&self) -> *mut Slider

Returns a raw pointer to the slider object.

Provided Methods§

Source

fn on_moved<F>(&self, handler: F)
where F: FnMut(&EvSlider) + 'static,

Set an event handler for slider movement.

Source

fn tooltip(&self, text: &str)

Set a tooltip for the slider. It is a small explanatory text that will appear when the mouse is over the control.

Source

fn steps(&self, steps: u32)

Changes the slider from continuous range to discrete intervals.

Source

fn value(&self, value: f32)

Set the slider position.

Source

fn get_value(&self) -> f32

Get the slider position.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§