#[non_exhaustive]pub enum AnimProp {
Show 13 variants
HoverAmount,
PressAmount,
FocusRingAlpha,
SubtreeHoverAmount,
SubtreePressAmount,
SubtreeFocusAmount,
AppFill,
AppStroke,
AppTextColor,
AppOpacity,
AppScale,
AppTranslateX,
AppTranslateY,
}Expand description
Identifies a specific animatable property on a node. Used as part of the per-(node, prop) tracker key.
Two families:
- State envelopes (
HoverAmount,PressAmount,FocusRingAlpha) are 0..1 floats tracking how much of the corresponding state’s visual delta is currently applied. The library updates these on every keyed interactive node automatically; no author opt-in. Why envelopes and not absolute colours:apply_stateindraw_opscomputes the display colour by lerping betweenn.fillandstate_color(n.fill)based on the envelope. That keeps state easing completely independent of build-value changes — when the author swaps a button’s fill mid-hover, the new fill takes effect instantly with the same hover envelope, no fighting between trackers. - App-driven absolute values (
App*) are author-opted-in viacrate::tree::El::animate. The tracker eases the value the build closure produces from the previous frame’s value to the new one.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
HoverAmount
0..1 amount of the hover-state visual delta currently applied. Eases 0→1 on pointer enter, 1→0 on pointer leave.
PressAmount
0..1 amount of the press-state visual delta currently applied. Eases 0→1 on press, 1→0 on release.
FocusRingAlpha
Focus-ring alpha — eases 0→1 on focus enter, 1→0 on focus leave. Lets the ring fade out after focus moves elsewhere.
SubtreeHoverAmount
0..1 amount tracking “is the hover target this node or any
descendant?”. Eases 0→1 when the cursor enters the subtree, 1→0
when it leaves. Drives region-shaped hover affordances
(hover_alpha, future hover-driven translate / scale / tint).
SubtreePressAmount
0..1 amount tracking “is the press target this node or any
descendant?”. Subtree analogue of PressAmount.
SubtreeFocusAmount
0..1 amount tracking “is the focus target this node or any
descendant?”. Subtree analogue of FocusRingAlpha. Composed
with SubtreeHoverAmount by hover_alpha so keyboard focus
reveals the same affordance hover does.
AppFill
App-driven fill colour — eases between the values the build closure produces across rebuilds.
AppStroke
App-driven stroke colour.
AppTextColor
App-driven text colour.
AppOpacity
App-driven paint-time alpha multiplier in [0, 1].
AppScale
App-driven uniform scale around the rect centre.
AppTranslateX
App-driven translate offset in logical pixels — X channel.
AppTranslateY
App-driven translate offset in logical pixels — Y channel.
Trait Implementations§
impl Copy for AnimProp
impl Eq for AnimProp
impl StructuralPartialEq for AnimProp
Auto Trait Implementations§
impl Freeze for AnimProp
impl RefUnwindSafe for AnimProp
impl Send for AnimProp
impl Sync for AnimProp
impl Unpin for AnimProp
impl UnsafeUnpin for AnimProp
impl UnwindSafe for AnimProp
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
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
key and return true if they are equal.Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.