Struct iced_audio::native::mod_range_input::ModRangeInput[][src]

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

An interactive dot that controls an NormalParam

Implementations

impl<'a, Message, Renderer: Renderer> ModRangeInput<'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 ModRangeInput.

It expects:

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

Sets the diameter of the ModRangeInput. The default size is Length::from(Length::Units(31)).

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

Sets the style of the ModRangeInput.

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

Sets how much the Normal value will change for the ModRangeInput per y pixel movement of the mouse.

The default value is 0.001925

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

Sets how much the Normal value will change for the ModRangeInput 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.005

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

Sets the modifier keys of the ModRangeInput.

The default modifier key is Ctrl.

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

Sets the scalar to use when the user drags the ModRangeInputs while holding down the modifier key. This is multiplied to the value set by ModRangeInput::scalar() (which the default is 0.001925).

For example, a modifier_scalar of 0.5 will cause the ModRangeInput to turn half as fast when the modifier key is down.

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

Trait Implementations

impl<'a, Message, Renderer> Widget<Message, Renderer> for ModRangeInput<'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 ModRangeInput<'a, Message, Renderer>

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

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

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

impl<'a, Message, Renderer> !UnwindSafe for ModRangeInput<'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