Struct iced_audio::native::xy_pad::XYPad [−][src]
pub struct XYPad<'a, Message, Renderer: Renderer> { /* fields omitted */ }
A 2D XY pad GUI widget that controls two NormalParam
parameters at
once. One in the x
coordinate and one in the y
coordinate.
an XYPad
will try to fill the space of its container while keeping a
square aspect ratio.
Implementations
impl<'a, Message, Renderer: Renderer> XYPad<'a, Message, Renderer>
[src]
impl<'a, Message, Renderer: Renderer> XYPad<'a, Message, Renderer>
[src]pub fn new<F>(state: &'a mut State, on_change: F) -> Self where
F: 'static + Fn(Normal, Normal) -> Message,
[src]
pub fn new<F>(state: &'a mut State, on_change: F) -> Self where
F: 'static + Fn(Normal, Normal) -> Message,
[src]pub fn modifier_keys(self, modifier_keys: Modifiers) -> Self
[src]
pub fn modifier_keys(self, modifier_keys: Modifiers) -> Self
[src]Sets the modifier keys of the XYPad
.
The default modifier key is Ctrl
.
pub fn modifier_scalar(self, scalar: f32) -> Self
[src]
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
.
Trait Implementations
impl<'a, Message, Renderer> Widget<Message, Renderer> for XYPad<'a, Message, Renderer> where
Renderer: Renderer,
[src]
impl<'a, Message, Renderer> Widget<Message, Renderer> for XYPad<'a, Message, Renderer> where
Renderer: Renderer,
[src]fn on_event(
&mut self,
event: Event,
layout: Layout<'_>,
cursor_position: Point,
_renderer: &Renderer,
_clipboard: &mut dyn Clipboard,
messages: &mut Vec<Message>
) -> Status
[src]
fn on_event(
&mut self,
event: Event,
layout: Layout<'_>,
cursor_position: Point,
_renderer: &Renderer,
_clipboard: &mut dyn Clipboard,
messages: &mut Vec<Message>
) -> Status
[src]fn draw(
&self,
renderer: &mut Renderer,
_defaults: &Renderer::Defaults,
layout: Layout<'_>,
cursor_position: Point,
_viewport: &Rectangle
) -> Renderer::Output
[src]
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]
fn hash_layout(&self, state: &mut Hasher)
[src]Auto Trait Implementations
impl<'a, Message, Renderer> !RefUnwindSafe for XYPad<'a, Message, Renderer>
impl<'a, Message, Renderer> !Send for XYPad<'a, Message, Renderer>
impl<'a, Message, Renderer> !Sync for XYPad<'a, Message, Renderer>
impl<'a, Message, Renderer> Unpin for XYPad<'a, Message, Renderer> where
<Renderer as Renderer>::Style: Unpin,
<Renderer as Renderer>::Style: Unpin,
impl<'a, Message, Renderer> !UnwindSafe for XYPad<'a, Message, Renderer>
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,