pub struct WaveformViewportController { /* private fields */ }Expand description
An observable, source-time Waveform Viewport and its navigation commands.
Create this Controller with use_waveform_viewport. Pan distances are
expressed as fractions of the current visible span. Zoom factors greater
than one zoom in, and the supplied source-time anchor remains at the same
relative position whenever source boundaries permit it.
Implementations§
Source§impl WaveformViewportController
impl WaveformViewportController
Sourcepub fn total_duration(self) -> Duration
pub fn total_duration(self) -> Duration
The complete source duration.
Sourcepub fn visible_range(self) -> Range<Duration>
pub fn visible_range(self) -> Range<Duration>
The current positive, half-open visible source-time interval.
Sourcepub fn is_following(self) -> bool
pub fn is_following(self) -> bool
Whether Playback position updates currently move the Viewport.
Sourcepub fn follow_playback(self, position: Duration)
pub fn follow_playback(self, position: Duration)
Keep Playback within the Viewport’s forward safe zone while following.
Positions inside the 15–75% safe zone do not move the Viewport. Once a position leaves it, the Viewport moves to place Playback at 25% unless a source boundary intervenes. Positions beyond the source are clamped.
Sourcepub fn resume_follow(self, position: Duration)
pub fn resume_follow(self, position: Duration)
Resume following Playback and immediately reveal its current position.
Sourcepub fn show_range(self, range: Range<Duration>)
pub fn show_range(self, range: Range<Duration>)
Present a requested source-time interval after clamping it to the source.
A collapsed or reversed request becomes the smallest representable positive interval at its requested start.
Trait Implementations§
Source§impl Clone for WaveformViewportController
impl Clone for WaveformViewportController
Source§fn clone(&self) -> WaveformViewportController
fn clone(&self) -> WaveformViewportController
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more