MaterialAppBarState
struct · ferroui-themes-material · v0.5.0
struct MaterialAppBarState
A serializable scroll snapshot. Deltas follow finger movement: up is negative. The offset is always between the negative collapse limit and zero.
Members
newheight_offset_limitheight_offsetcontent_offsetcontent_at_startset_height_offset_limitset_height_offsetset_content_offsetset_content_at_startcollapsed_fractionoverlapped_fractionpre_scrollpost_scrollreset_content_after_flingsnap_target
new
fn new(height_offset_limit: f64) -> Self
height_offset_limit
fn height_offset_limit(self: Self) -> f64
height_offset
fn height_offset(self: Self) -> f64
content_offset
fn content_offset(self: Self) -> f64
content_at_start
fn content_at_start(self: Self) -> bool
set_height_offset_limit
fn set_height_offset_limit(self: &mut Self, value: f64)
set_height_offset
fn set_height_offset(self: &mut Self, value: f64)
set_content_offset
fn set_content_offset(self: &mut Self, value: f64)
set_content_at_start
fn set_content_at_start(self: &mut Self, value: bool)
collapsed_fraction
fn collapsed_fraction(self: Self) -> f64
overlapped_fraction
fn overlapped_fraction(self: Self) -> f64
pre_scroll
fn pre_scroll(self: &mut Self, behavior: MaterialAppBarScrollBehavior, available_y: f64) -> f64
The source pre-scroll contract consumes the Y gesture when the bar changes height.
post_scroll
fn post_scroll(self: &mut Self, behavior: MaterialAppBarScrollBehavior, consumed_y: f64, available_y: f64) -> f64
Called after the child. Only exit-until-collapsed responds to leftover downward scroll.
reset_content_after_fling
fn reset_content_after_fling(self: &mut Self, available_velocity_y: f64)
snap_target
fn snap_target(self: Self) -> Option<f64>
Native rounding tolerance and nearest-anchor threshold, used after decay finishes.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedPropertyValueAnyValueClassDefaultsErasedDestructorIntoEitherCastableFrom<ST, Uninit, Uninit>CastableFrom<ST, Initialized, Initialized>Read<Exclusive, BecauseExclusive>CloneCopyDebugStructuralPartialEqPartialEqDefault
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.