MaterialAppBar
struct · ferroui-themes-material · v0.5.0
struct MaterialAppBar
Place this bar above its ScrollSource in an Auto,* grid. Navigation and Actions are
ordinary controls: commands, keyboard focus and automation remain their own.
The scroll source is weak. A drag consumes app-bar pre-scroll, then child scroll,
then leftover app-bar post-scroll; horizontal gestures remain with the child.
Members
TYPEto_reftitle_propertysubtitle_propertynavigation_propertyactions_propertysize_variant_propertyscroll_behavior_propertyscroll_source_propertycollapsed_height_propertyexpanded_height_propertycenter_title_propertysafe_insets_propertyscrolled_background_propertycan_scroll_propertyis_snap_enabled_propertyreduced_motion_propertymotion_scheme_propertyheight_offset_propertycollapsed_fraction_propertyoverlapped_fraction_propertyconstructnewtitleset_titlesubtitleset_subtitlenavigationset_navigationactionsset_actionssize_variantset_size_variantscroll_behaviorset_scroll_behaviorscroll_sourceset_scroll_sourcecollapsed_heightset_collapsed_heightexpanded_heightset_expanded_heightcenter_titleset_center_titlesafe_insetsset_safe_insetsscrolled_backgroundset_scrolled_backgroundcan_scrollset_can_scrollis_snap_enabledset_is_snap_enabledreduced_motionset_reduced_motionmotion_schemeset_motion_schemestateheight_offsetcollapsed_fractionoverlapped_fractionis_animatingset_height_offsetrestore_stateexpandcollapsepre_scrollpost_scrollsettlescroll_content_by
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<MaterialAppBar>
Returns a strong reference to this object.
title_property
fn title_property() -> &'static StyledProperty<Option<String>>
subtitle_property
fn subtitle_property() -> &'static StyledProperty<Option<String>>
navigation_property
fn navigation_property() -> &'static StyledProperty<Option<BoxedValue>>
actions_property
fn actions_property() -> &'static StyledProperty<Option<BoxedValue>>
size_variant_property
fn size_variant_property() -> &'static StyledProperty<MaterialAppBarSize>
scroll_behavior_property
fn scroll_behavior_property() -> &'static StyledProperty<MaterialAppBarScrollBehavior>
scroll_source_property
fn scroll_source_property() -> &'static StyledProperty<Option<ElementRef<ScrollViewer>>>
collapsed_height_property
fn collapsed_height_property() -> &'static StyledProperty<f64>
expanded_height_property
fn expanded_height_property() -> &'static StyledProperty<f64>
NaN selects the source-defined height for the variant and subtitle presence.
center_title_property
fn center_title_property() -> &'static StyledProperty<bool>
safe_insets_property
fn safe_insets_property() -> &'static StyledProperty<Thickness>
scrolled_background_property
fn scrolled_background_property() -> &'static StyledProperty<Option<Rc<dyn IBrush>>>
can_scroll_property
fn can_scroll_property() -> &'static StyledProperty<bool>
is_snap_enabled_property
fn is_snap_enabled_property() -> &'static StyledProperty<bool>
reduced_motion_property
fn reduced_motion_property() -> &'static StyledProperty<bool>
motion_scheme_property
fn motion_scheme_property() -> &'static StyledProperty<MaterialMotionScheme>
height_offset_property
fn height_offset_property() -> &'static DirectProperty<MaterialAppBar, f64>
collapsed_fraction_property
fn collapsed_fraction_property() -> &'static DirectProperty<MaterialAppBar, f64>
overlapped_fraction_property
fn overlapped_fraction_property() -> &'static DirectProperty<MaterialAppBar, f64>
construct
fn construct() -> Self
new
fn new() -> Ref<Self>
title
fn title(self: &Self) -> Option<String>
set_title
fn set_title(self: &Self, value: Option<String>)
subtitle
fn subtitle(self: &Self) -> Option<String>
set_subtitle
fn set_subtitle(self: &Self, value: Option<String>)
navigation
fn navigation(self: &Self) -> Option<BoxedValue>
set_navigation
fn set_navigation(self: &Self, value: Option<BoxedValue>)
actions
fn actions(self: &Self) -> Option<BoxedValue>
set_actions
fn set_actions(self: &Self, value: Option<BoxedValue>)
size_variant
fn size_variant(self: &Self) -> MaterialAppBarSize
set_size_variant
fn set_size_variant(self: &Self, value: MaterialAppBarSize)
scroll_behavior
fn scroll_behavior(self: &Self) -> MaterialAppBarScrollBehavior
set_scroll_behavior
fn set_scroll_behavior(self: &Self, value: MaterialAppBarScrollBehavior)
scroll_source
fn scroll_source(self: &Self) -> Option<Ref<ScrollViewer>>
set_scroll_source
fn set_scroll_source(self: &Self, value: Option<Ref<ScrollViewer>>)
collapsed_height
fn collapsed_height(self: &Self) -> f64
set_collapsed_height
fn set_collapsed_height(self: &Self, value: f64)
expanded_height
fn expanded_height(self: &Self) -> f64
set_expanded_height
fn set_expanded_height(self: &Self, value: f64)
center_title
fn center_title(self: &Self) -> bool
set_center_title
fn set_center_title(self: &Self, value: bool)
safe_insets
fn safe_insets(self: &Self) -> Thickness
set_safe_insets
fn set_safe_insets(self: &Self, value: Thickness)
scrolled_background
fn scrolled_background(self: &Self) -> Option<Rc<dyn IBrush>>
set_scrolled_background
fn set_scrolled_background(self: &Self, value: Option<Rc<dyn IBrush>>)
can_scroll
fn can_scroll(self: &Self) -> bool
set_can_scroll
fn set_can_scroll(self: &Self, value: bool)
is_snap_enabled
fn is_snap_enabled(self: &Self) -> bool
set_is_snap_enabled
fn set_is_snap_enabled(self: &Self, value: bool)
reduced_motion
fn reduced_motion(self: &Self) -> bool
set_reduced_motion
fn set_reduced_motion(self: &Self, value: bool)
motion_scheme
fn motion_scheme(self: &Self) -> MaterialMotionScheme
set_motion_scheme
fn set_motion_scheme(self: &Self, value: MaterialMotionScheme)
state
fn state(self: &Self) -> MaterialAppBarState
height_offset
fn height_offset(self: &Self) -> f64
collapsed_fraction
fn collapsed_fraction(self: &Self) -> f64
overlapped_fraction
fn overlapped_fraction(self: &Self) -> f64
is_animating
fn is_animating(self: &Self) -> bool
set_height_offset
fn set_height_offset(self: &Self, value: f64)
restore_state
fn restore_state(self: &Self, value: MaterialAppBarState)
expand
fn expand(self: &Self)
collapse
fn collapse(self: &Self)
pre_scroll
fn pre_scroll(self: &Self, available_y: f64) -> f64
For a custom nested-scroll container. Units are dp; upward finger movement is negative.
post_scroll
fn post_scroll(self: &Self, consumed_y: f64, available_y: f64) -> f64
settle
fn settle(self: &Self, velocity_y: f64)
Settles after a user scroll/fling, using native spline decay then DefaultEffects snap.
scroll_content_by
fn scroll_content_by(self: &Self, delta_y: f64) -> f64
Runs the native pre/child/post ordering against the configured physical ScrollViewer.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherCastableFrom<ST, Uninit, Uninit>CastableFrom<ST, Initialized, Initialized>Read<Exclusive, BecauseExclusive>TemplatedControlImplExtControlImplExtDerefUpcast<T>Upcast<MaterialAppBar>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleStyledElementImplInteractiveImplLayoutableImplControlImplFerroObjectImplVisualImplTemplatedControlImplInputElementImplDrop
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.