Struct iced_audio::native::v_slider::VSlider[][src]

pub struct VSlider<'a, Message, Renderer: Renderer> { /* fields omitted */ }

A vertical slider GUI widget that controls a NormalParam

a VSlider will try to fill the vertical space of its container.

Implementations

impl<'a, Message, Renderer: Renderer> VSlider<'a, Message, Renderer>[src]

pub fn new<F>(state: &'a mut State, on_change: F) -> Self where
    F: 'static + Fn(Normal) -> Message, 
[src]

Creates a new VSlider.

It expects:

pub fn width(self, width: Length) -> Self[src]

Sets the width of the VSlider. The default width is Length::Units(14).

pub fn height(self, height: Length) -> Self[src]

Sets the height of the VSlider. The default height is Length::Fill.

pub fn style(self, style: impl Into<Renderer::Style>) -> Self[src]

Sets the style of the VSlider.

pub fn modifier_keys(self, modifier_keys: Modifiers) -> Self[src]

Sets the modifier keys of the VSlider.

The default modifier key is Ctrl.

pub fn scalar(self, scalar: f32) -> Self[src]

Sets the scalar to use when the user drags the slider per pixel.

For example, a scalar of 0.5 will cause the slider to move half a pixel for every pixel the mouse moves.

The default scalar is 0.9575.

pub fn wheel_scalar(self, wheel_scalar: f32) -> Self[src]

Sets how much the Normal value will change for the VSlider per line scrolled by the mouse wheel.

This can be set to 0.0 to disable the scroll wheel from moving the parameter.

The default value is 0.01

pub fn modifier_scalar(self, scalar: f32) -> Self[src]

Sets the scalar to use when the user drags the slider while holding down the modifier key.

For example, a scalar of 0.5 will cause the slider to move half a pixel for every pixel the mouse moves.

The default scalar is 0.02, and the default modifier key is Ctrl.

pub fn tick_marks(self, tick_marks: &'a Group) -> Self[src]

Sets the tick marks to display. Note your StyleSheet must also implement tick_marks_style(&self) -> Option<tick_marks::Style> for them to display (which the default style does).

pub fn text_marks(self, text_marks: &'a Group) -> Self[src]

Sets the text marks to display. Note your StyleSheet must also implement text_marks_style(&self) -> Option<text_marks::Style> for them to display (which the default style does).

pub fn mod_range(self, mod_range: &'a ModulationRange) -> Self[src]

Sets a ModulationRange to display. Note your StyleSheet must also implement mod_range_style(&self) -> Option<ModRangeStyle> for them to display.

pub fn mod_range_2(self, mod_range: &'a ModulationRange) -> Self[src]

Sets a second ModulationRange to display. Note your StyleSheet must also implement mod_range_style_2(&self) -> Option<ModRangeStyle> for them to display.

Trait Implementations

impl<'a, Message, Renderer> Widget<Message, Renderer> for VSlider<'a, Message, Renderer> where
    Renderer: Renderer
[src]

fn width(&self) -> Length[src]

Returns the width of the Widget.

fn height(&self) -> Length[src]

Returns the height of the Widget.

fn layout(&self, _renderer: &Renderer, limits: &Limits) -> Node[src]

Returns the Node of the Widget. Read more

fn on_event(
    &mut self,
    event: Event,
    layout: Layout<'_>,
    cursor_position: Point,
    _renderer: &Renderer,
    _clipboard: &mut dyn Clipboard,
    messages: &mut Vec<Message>
) -> Status
[src]

Processes a runtime Event. Read more

fn draw(
    &self,
    renderer: &mut Renderer,
    _defaults: &Renderer::Defaults,
    layout: Layout<'_>,
    cursor_position: Point,
    _viewport: &Rectangle
) -> Renderer::Output
[src]

Draws the Widget using the associated Renderer.

fn hash_layout(&self, state: &mut Hasher)[src]

Computes the layout hash of the Widget. Read more

fn overlay(
    &mut self,
    _layout: Layout<'_>
) -> Option<Element<'_, Message, Renderer>>
[src]

Returns the overlay of the Widget, if there is any.

Auto Trait Implementations

impl<'a, Message, Renderer> !RefUnwindSafe for VSlider<'a, Message, Renderer>

impl<'a, Message, Renderer> !Send for VSlider<'a, Message, Renderer>

impl<'a, Message, Renderer> !Sync for VSlider<'a, Message, Renderer>

impl<'a, Message, Renderer> Unpin for VSlider<'a, Message, Renderer> where
    <Renderer as Renderer>::Style: Unpin

impl<'a, Message, Renderer> !UnwindSafe for VSlider<'a, Message, Renderer>

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

pub fn type_id(&self) -> TypeId[src]

Gets the TypeId of self. Read more

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

pub fn borrow(&self) -> &T[src]

Immutably borrows from an owned value. Read more

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

pub fn borrow_mut(&mut self) -> &mut T[src]

Mutably borrows from an owned value. Read more

impl<T> From<T> for T[src]

pub fn from(t: T) -> T[src]

Performs the conversion.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

pub fn into(self) -> U[src]

Performs the conversion.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]

Performs the conversion.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

pub fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]

Performs the conversion.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 

pub fn vzip(self) -> V