Struct nih_plug_iced::widgets::peak_meter::PeakMeter
source · pub struct PeakMeter<'a, Message> { /* private fields */ }
Expand description
A simple horizontal peak meter.
TODO: There are currently no styling options at all TODO: Vertical peak meter, this is just a proof of concept to fit the gain GUI example.
Implementations§
source§impl<'a, Message> PeakMeter<'a, Message>
impl<'a, Message> PeakMeter<'a, Message>
sourcepub fn new(state: &'a mut State, value_db: f32) -> Self
pub fn new(state: &'a mut State, value_db: f32) -> Self
Creates a new PeakMeter
using the current measurement in decibel. This measurement can
already have some form of smoothing applied to it. This peak slider widget can draw the last
hold value for you.
Trait Implementations§
source§impl<'a, Message> From<PeakMeter<'a, Message>> for Element<'a, Message>where
Message: 'a + Clone,
impl<'a, Message> From<PeakMeter<'a, Message>> for Element<'a, Message>where Message: 'a + Clone,
source§impl<'a, Message> Widget<Message, Renderer<Backend>> for PeakMeter<'a, Message>where
Message: Clone,
impl<'a, Message> Widget<Message, Renderer<Backend>> for PeakMeter<'a, Message>where Message: Clone,
source§fn draw(
&self,
renderer: &mut Renderer,
style: &Style,
layout: Layout<'_>,
_cursor_position: Point,
_viewport: &Rectangle
)
fn draw( &self, renderer: &mut Renderer, style: &Style, layout: Layout<'_>, _cursor_position: Point, _viewport: &Rectangle )
Draws the [
Widget
] using the associated Renderer
.§fn on_event(
&mut self,
_event: Event,
_layout: Layout<'_>,
_cursor_position: Point,
_renderer: &Renderer,
_clipboard: &mut dyn Clipboard,
_shell: &mut Shell<'_, Message>
) -> Status
fn on_event( &mut self, _event: Event, _layout: Layout<'_>, _cursor_position: Point, _renderer: &Renderer, _clipboard: &mut dyn Clipboard, _shell: &mut Shell<'_, Message> ) -> Status
Processes a runtime [
Event
]. Read more§fn mouse_interaction(
&self,
_layout: Layout<'_>,
_cursor_position: Point,
_viewport: &Rectangle<f32>,
_renderer: &Renderer
) -> Interaction
fn mouse_interaction( &self, _layout: Layout<'_>, _cursor_position: Point, _viewport: &Rectangle<f32>, _renderer: &Renderer ) -> Interaction
Auto Trait Implementations§
impl<'a, Message> RefUnwindSafe for PeakMeter<'a, Message>where Message: RefUnwindSafe,
impl<'a, Message> Send for PeakMeter<'a, Message>where Message: Send,
impl<'a, Message> Sync for PeakMeter<'a, Message>where Message: Sync,
impl<'a, Message> Unpin for PeakMeter<'a, Message>where Message: Unpin,
impl<'a, Message> !UnwindSafe for PeakMeter<'a, Message>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more