pub enum ModalExitAnimation {
ScaleOut,
FadeOut,
SlideUp,
SlideDown,
None,
}Expand description
Exit animation type for modal content.
Variants§
ScaleOut
Scale down to center (reverse of ScaleIn).
FadeOut
Fade out (opacity only, no scale).
SlideUp
Slide up with fade.
SlideDown
Slide down with fade.
None
No animation (instant disappear).
Implementations§
Source§impl ModalExitAnimation
impl ModalExitAnimation
Sourcepub fn final_scale(self, config: &ModalAnimationConfig) -> f64
pub fn final_scale(self, config: &ModalAnimationConfig) -> f64
Get the final scale factor for this animation.
Sourcepub fn final_opacity(self) -> f64
pub fn final_opacity(self) -> f64
Get the final opacity for this animation.
Sourcepub fn final_y_offset(self, modal_height: u16) -> i16
pub fn final_y_offset(self, modal_height: u16) -> i16
Get the final Y offset in cells for this animation.
Sourcepub fn scale_at_progress(
self,
progress: f64,
config: &ModalAnimationConfig,
) -> f64
pub fn scale_at_progress( self, progress: f64, config: &ModalAnimationConfig, ) -> f64
Calculate scale at a given eased progress (0.0 to 1.0).
Progress 0.0 = full size, 1.0 = final (shrunken).
Sourcepub fn opacity_at_progress(self, progress: f64) -> f64
pub fn opacity_at_progress(self, progress: f64) -> f64
Calculate opacity at a given eased progress (0.0 to 1.0).
Sourcepub fn y_offset_at_progress(self, progress: f64, modal_height: u16) -> i16
pub fn y_offset_at_progress(self, progress: f64, modal_height: u16) -> i16
Calculate Y offset at a given eased progress (0.0 to 1.0).
Trait Implementations§
Source§impl Clone for ModalExitAnimation
impl Clone for ModalExitAnimation
Source§fn clone(&self) -> ModalExitAnimation
fn clone(&self) -> ModalExitAnimation
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ModalExitAnimation
impl Debug for ModalExitAnimation
Source§impl Default for ModalExitAnimation
impl Default for ModalExitAnimation
Source§fn default() -> ModalExitAnimation
fn default() -> ModalExitAnimation
Returns the “default value” for a type. Read more
Source§impl PartialEq for ModalExitAnimation
impl PartialEq for ModalExitAnimation
impl Copy for ModalExitAnimation
impl Eq for ModalExitAnimation
impl StructuralPartialEq for ModalExitAnimation
Auto Trait Implementations§
impl Freeze for ModalExitAnimation
impl RefUnwindSafe for ModalExitAnimation
impl Send for ModalExitAnimation
impl Sync for ModalExitAnimation
impl Unpin for ModalExitAnimation
impl UnwindSafe for ModalExitAnimation
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,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.