#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum EntranceType {
Appear,
Fade,
FlyIn,
Wipe,
Split,
Wheel,
RandomBars,
GrowAndTurn,
Zoom,
Bounce,
}
impl EntranceType {
#[must_use]
pub const fn preset_id(self) -> u32 {
match self {
Self::Appear => 1,
Self::Fade => 10,
Self::FlyIn => 2,
Self::Wipe => 22,
Self::Split => 16,
Self::Wheel => 21,
Self::RandomBars => 14,
Self::GrowAndTurn => 15,
Self::Zoom => 23,
Self::Bounce => 24,
}
}
}
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ExitType {
Disappear,
Fade,
FlyOut,
Wipe,
Split,
}
impl ExitType {
#[must_use]
pub const fn preset_id(self) -> u32 {
match self {
Self::Disappear => 1,
Self::Fade => 10,
Self::FlyOut => 2,
Self::Wipe => 22,
Self::Split => 16,
}
}
}
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum EmphasisType {
Bold,
Grow,
Spin,
Transparency,
Pulse,
Teeter,
}
impl EmphasisType {
#[must_use]
pub const fn preset_id(self) -> u32 {
match self {
Self::Bold => 1,
Self::Grow => 6,
Self::Spin => 8,
Self::Transparency => 9,
Self::Pulse => 10,
Self::Teeter => 13,
}
}
}
#[non_exhaustive]
#[derive(Debug, Clone, PartialEq, Eq)]
pub enum AnimationEffect {
Entrance(EntranceType),
Exit(ExitType),
Emphasis(EmphasisType),
MotionPath(String),
}
impl AnimationEffect {
pub(super) const fn preset_class(&self) -> &'static str {
match self {
Self::Entrance(_) => "entr",
Self::Exit(_) => "exit",
Self::Emphasis(_) => "emph",
Self::MotionPath(_) => "path",
}
}
pub(super) const fn preset_id(&self) -> u32 {
match self {
Self::Entrance(e) => e.preset_id(),
Self::Exit(e) => e.preset_id(),
Self::Emphasis(e) => e.preset_id(),
Self::MotionPath(_) => 0, }
}
}
#[non_exhaustive]
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum AnimationTrigger {
OnClick,
WithPrevious,
AfterPrevious,
}