pub enum TimelineEvent {
TimeChanged(f32),
SelectionChanged {
track: Option<usize>,
keyframe: Option<usize>,
},
KeyframeMoved {
track: usize,
index: usize,
time: f32,
value: f32,
},
KeyframeRequested {
track: usize,
time: f32,
},
KeyframeRemoved {
track: usize,
index: usize,
},
PlaybackChanged(bool),
TrackMoved {
from: usize,
to: usize,
},
TrackCollapsed {
index: usize,
collapsed: bool,
},
TrackInterpolation {
index: usize,
interpolation: Interpolation,
},
}Expand description
时间线抛出的事件(应用经 subscribe 接收)。
Variants§
TimeChanged(f32)
播放头时间变化(拖拽标尺 / 键盘 / 应用设置)。
SelectionChanged
选中变化(轨道 / 关键帧)。
KeyframeMoved
关键帧被拖动(时间与值都可能变化;index 为移动后的下标)。
KeyframeRequested
请求在(轨道, 时间)处新增关键帧(双击空白处)。
KeyframeRemoved
关键帧被删除。
PlaybackChanged(bool)
播放 / 暂停状态切换。
TrackMoved
轨道顺序变化(to 为移动后的下标)。
TrackCollapsed
轨道折叠 / 展开。
TrackInterpolation
轨道插值方式变化。
Trait Implementations§
Source§impl Clone for TimelineEvent
impl Clone for TimelineEvent
Source§impl Debug for TimelineEvent
impl Debug for TimelineEvent
impl EventEmitter<TimelineEvent> for TimelineState
Source§impl PartialEq for TimelineEvent
impl PartialEq for TimelineEvent
impl StructuralPartialEq for TimelineEvent
Auto Trait Implementations§
impl Forget for TimelineEvent
impl Freeze for TimelineEvent
impl Move for TimelineEvent
impl RefUnwindSafe for TimelineEvent
impl Send for TimelineEvent
impl Sync for TimelineEvent
impl Unpin for TimelineEvent
impl UnsafeUnpin for TimelineEvent
impl UnwindSafe for TimelineEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more