pub struct ProxyAnimation { /* private fields */ }Expand description
An animation that is a proxy for another animation.
A proxy animation is useful because the parent animation can be mutated. For example, one object can create a proxy animation, hand the proxy to another object, and then later change the animation from which the proxy receives its value.
Implementations§
Source§impl ProxyAnimation
impl ProxyAnimation
Sourcepub fn new(
app: &mut App,
animation: Option<Retained<AnyAnimation<f64>>>,
) -> Retained<Handle<ProxyAnimation>>
pub fn new( app: &mut App, animation: Option<Retained<AnyAnimation<f64>>>, ) -> Retained<Handle<ProxyAnimation>>
Creates a proxy animation.
If the animation argument is None, the proxy animation has the status
AnimationStatus::Dismissed and a value of 0.0.
Sourcepub fn parent(
self: Handle<ProxyAnimation>,
app: &App,
) -> Option<AnyAnimation<f64>>
pub fn parent( self: Handle<ProxyAnimation>, app: &App, ) -> Option<AnyAnimation<f64>>
The animation whose value this animation will proxy.
This value is mutable (set_parent).
When mutated, the listeners on the proxy animation will be
transparently updated to be listening to the new parent animation.
The bare handle, which the proxy keeps alive while it is the parent; a
caller that keeps it takes AnyAnimation::upgrade.
Sourcepub fn set_parent(
self: Handle<ProxyAnimation>,
app: &mut App,
value: Option<Retained<AnyAnimation<f64>>>,
)
pub fn set_parent( self: Handle<ProxyAnimation>, app: &mut App, value: Option<Retained<AnyAnimation<f64>>>, )
Changes the animation whose value this animation proxies.
Dart’s parent setter, animations.dart:200.
Trait Implementations§
Source§impl Animation<f64> for ProxyAnimation
impl Animation<f64> for ProxyAnimation
Source§fn add_listener(self: Handle<ProxyAnimation>, app: &mut App, listener: Listener)
fn add_listener(self: Handle<ProxyAnimation>, app: &mut App, listener: Listener)
Source§fn remove_listener(
self: Handle<ProxyAnimation>,
app: &mut App,
listener: &Listener,
)
fn remove_listener( self: Handle<ProxyAnimation>, app: &mut App, listener: &Listener, )
Source§fn add_status_listener(
self: Handle<ProxyAnimation>,
app: &mut App,
listener: AnimationStatusListener,
)
fn add_status_listener( self: Handle<ProxyAnimation>, app: &mut App, listener: AnimationStatusListener, )
Source§fn remove_status_listener(
self: Handle<ProxyAnimation>,
app: &mut App,
listener: &AnimationStatusListener,
)
fn remove_status_listener( self: Handle<ProxyAnimation>, app: &mut App, listener: &AnimationStatusListener, )
Source§fn status(self: Handle<ProxyAnimation>, app: &App) -> AnimationStatus
fn status(self: Handle<ProxyAnimation>, app: &App) -> AnimationStatus
Source§fn value(self: Handle<ProxyAnimation>, app: &App) -> f64
fn value(self: Handle<ProxyAnimation>, app: &App) -> f64
Source§fn is_dismissed(self: Handle<Self>, app: &App) -> bool
fn is_dismissed(self: Handle<Self>, app: &App) -> bool
Source§fn is_completed(self: Handle<Self>, app: &App) -> bool
fn is_completed(self: Handle<Self>, app: &App) -> bool
Source§fn is_animating(self: Handle<Self>, app: &App) -> bool
fn is_animating(self: Handle<Self>, app: &App) -> bool
Source§fn is_forward_or_completed(self: Handle<Self>, app: &App) -> bool
fn is_forward_or_completed(self: Handle<Self>, app: &App) -> bool
Source§fn to_string_details(self: Handle<Self>, app: &App) -> String
fn to_string_details(self: Handle<Self>, app: &App) -> String
Animation.toStringDetails: the status as its arrow.Source§fn to_string(self: Handle<Self>, app: &App) -> String
fn to_string(self: Handle<Self>, app: &App) -> String
Animation.toString: the identity and toStringDetails.Source§fn as_animation(self: Handle<Self>) -> AnyAnimation<T>
fn as_animation(self: Handle<Self>) -> AnyAnimation<T>
AnyAnimation<T> — what to pass where
a Dart API takes an Animation<T>. Read moreSource§impl AnimationLazyListenerMixin for ProxyAnimation
impl AnimationLazyListenerMixin for ProxyAnimation
Source§fn lazy_listener_data(
self: Handle<ProxyAnimation>,
app: &App,
) -> &AnimationLazyListenerData
fn lazy_listener_data( self: Handle<ProxyAnimation>, app: &App, ) -> &AnimationLazyListenerData
Source§fn lazy_listener_data_mut(
self: Handle<ProxyAnimation>,
app: &mut App,
) -> &mut AnimationLazyListenerData
fn lazy_listener_data_mut( self: Handle<ProxyAnimation>, app: &mut App, ) -> &mut AnimationLazyListenerData
Source§fn did_start_listening(self: Handle<ProxyAnimation>, app: &mut App)
fn did_start_listening(self: Handle<ProxyAnimation>, app: &mut App)
Source§fn did_stop_listening(self: Handle<ProxyAnimation>, app: &mut App)
fn did_stop_listening(self: Handle<ProxyAnimation>, app: &mut App)
Source§fn did_register_listener(self: Handle<Self>, app: &mut App)
fn did_register_listener(self: Handle<Self>, app: &mut App)
did_start_listening every time a registration of a listener
causes an empty list of listeners to become non-empty. Read moreSource§fn did_unregister_listener(self: Handle<Self>, app: &mut App)
fn did_unregister_listener(self: Handle<Self>, app: &mut App)
did_stop_listening when an only remaining listener is
unregistered, thus making the list empty. Read moreSource§impl AnimationLocalListenersMixin for ProxyAnimation
impl AnimationLocalListenersMixin for ProxyAnimation
Source§fn local_listeners_data(
self: Handle<ProxyAnimation>,
app: &App,
) -> &AnimationLocalListenersData
fn local_listeners_data( self: Handle<ProxyAnimation>, app: &App, ) -> &AnimationLocalListenersData
Source§fn local_listeners_data_mut(
self: Handle<ProxyAnimation>,
app: &mut App,
) -> &mut AnimationLocalListenersData
fn local_listeners_data_mut( self: Handle<ProxyAnimation>, app: &mut App, ) -> &mut AnimationLocalListenersData
Source§fn did_register_listener(self: Handle<ProxyAnimation>, app: &mut App)
fn did_register_listener(self: Handle<ProxyAnimation>, app: &mut App)
add_listener. Read moreSource§fn did_unregister_listener(self: Handle<ProxyAnimation>, app: &mut App)
fn did_unregister_listener(self: Handle<ProxyAnimation>, app: &mut App)
remove_listener. Read moreSource§fn add_listener(self: Handle<Self>, app: &mut App, listener: Listener)
fn add_listener(self: Handle<Self>, app: &mut App, listener: Listener)
Source§fn remove_listener(self: Handle<Self>, app: &mut App, listener: &Listener)
fn remove_listener(self: Handle<Self>, app: &mut App, listener: &Listener)
Source§fn clear_listeners(self: Handle<Self>, app: &mut App)
fn clear_listeners(self: Handle<Self>, app: &mut App)
add_listener. Read moreSource§impl AnimationLocalStatusListenersMixin for ProxyAnimation
impl AnimationLocalStatusListenersMixin for ProxyAnimation
Source§fn local_status_listeners_data(
self: Handle<ProxyAnimation>,
app: &App,
) -> &AnimationLocalStatusListenersData
fn local_status_listeners_data( self: Handle<ProxyAnimation>, app: &App, ) -> &AnimationLocalStatusListenersData
Source§fn local_status_listeners_data_mut(
self: Handle<ProxyAnimation>,
app: &mut App,
) -> &mut AnimationLocalStatusListenersData
fn local_status_listeners_data_mut( self: Handle<ProxyAnimation>, app: &mut App, ) -> &mut AnimationLocalStatusListenersData
Source§fn did_register_listener(self: Handle<ProxyAnimation>, app: &mut App)
fn did_register_listener(self: Handle<ProxyAnimation>, app: &mut App)
add_status_listener. Read moreSource§fn did_unregister_listener(self: Handle<ProxyAnimation>, app: &mut App)
fn did_unregister_listener(self: Handle<ProxyAnimation>, app: &mut App)
remove_status_listener. Read moreSource§fn add_status_listener(
self: Handle<Self>,
app: &mut App,
listener: AnimationStatusListener,
)
fn add_status_listener( self: Handle<Self>, app: &mut App, listener: AnimationStatusListener, )
Source§fn remove_status_listener(
self: Handle<Self>,
app: &mut App,
listener: &AnimationStatusListener,
)
fn remove_status_listener( self: Handle<Self>, app: &mut App, listener: &AnimationStatusListener, )
Source§fn clear_status_listeners(self: Handle<Self>, app: &mut App)
fn clear_status_listeners(self: Handle<Self>, app: &mut App)
add_status_listener. Read more