pub struct WaveformView {
pub asset_id: u64,
pub view_start_frame: u64,
pub view_end_frame: u64,
pub channel_heights: Vec<f32>,
pub zoom: f32,
pub cursor_frame: u64,
pub selection_start: Option<u64>,
pub selection_end: Option<u64>,
pub show_loop_markers: bool,
pub show_spectogram: bool,
pub amplitude_scale: f32,
}Fields§
§asset_id: u64§view_start_frame: u64§view_end_frame: u64§channel_heights: Vec<f32>§zoom: f32§cursor_frame: u64§selection_start: Option<u64>§selection_end: Option<u64>§show_loop_markers: bool§show_spectogram: bool§amplitude_scale: f32Implementations§
Source§impl WaveformView
impl WaveformView
pub fn new(asset: &AudioAsset) -> Self
pub fn view_duration_frames(&self) -> u64
pub fn frame_to_x(&self, frame: u64, width: f32) -> f32
pub fn x_to_frame(&self, x: f32, width: f32) -> u64
pub fn scroll(&mut self, delta_frames: i64, total_frames: u64)
pub fn zoom_around_cursor(&mut self, factor: f32, total_frames: u64)
pub fn select_region(&mut self, start_x: f32, end_x: f32, width: f32)
pub fn has_selection(&self) -> bool
pub fn selection_length(&self) -> u64
Trait Implementations§
Source§impl Clone for WaveformView
impl Clone for WaveformView
Auto Trait Implementations§
impl Freeze for WaveformView
impl RefUnwindSafe for WaveformView
impl Send for WaveformView
impl Sync for WaveformView
impl Unpin for WaveformView
impl UnsafeUnpin for WaveformView
impl UnwindSafe for WaveformView
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.