pub struct BottomSheetState { /* private fields */ }Expand description
Retained position, available stops and transitions of a bottom sheet.
Implementations§
Source§impl BottomSheetState
impl BottomSheetState
pub fn new( initial: BottomSheetValue, cx: &mut Context<'_, BottomSheetState>, ) -> BottomSheetState
Sourcepub fn enabled_values(
self,
values: impl IntoIterator<Item = BottomSheetValue>,
) -> BottomSheetState
pub fn enabled_values( self, values: impl IntoIterator<Item = BottomSheetValue>, ) -> BottomSheetState
Configures available stops. An empty set retains the initial stop.
Sourcepub fn confirm_value_change(
self,
confirm: impl Fn(BottomSheetValue) -> bool + 'static,
) -> BottomSheetState
pub fn confirm_value_change( self, confirm: impl Fn(BottomSheetValue) -> bool + 'static, ) -> BottomSheetState
Vetoes a requested destination before it changes visibility or focus.
pub fn available_values(&self) -> &[BottomSheetValue]
pub fn current_value(&self) -> BottomSheetValue
pub fn target_value(&self) -> BottomSheetValue
pub fn is_animating(&self) -> bool
pub fn visible_height(&self) -> Pixels
pub fn show( &mut self, window: &mut Window, cx: &mut Context<'_, BottomSheetState>, ) -> bool
pub fn expand( &mut self, window: &mut Window, cx: &mut Context<'_, BottomSheetState>, ) -> bool
pub fn partial_expand( &mut self, window: &mut Window, cx: &mut Context<'_, BottomSheetState>, ) -> bool
pub fn hide( &mut self, window: &mut Window, cx: &mut Context<'_, BottomSheetState>, ) -> bool
pub fn animate_to( &mut self, value: BottomSheetValue, window: &mut Window, cx: &mut Context<'_, BottomSheetState>, ) -> bool
pub fn snap_to( &mut self, value: BottomSheetValue, window: &mut Window, cx: &mut Context<'_, BottomSheetState>, ) -> bool
Auto Trait Implementations§
impl !RefUnwindSafe for BottomSheetState
impl !Send for BottomSheetState
impl !Sync for BottomSheetState
impl !UnwindSafe for BottomSheetState
impl Forget for BottomSheetState
impl Freeze for BottomSheetState
impl Move for BottomSheetState
impl Unpin for BottomSheetState
impl UnsafeUnpin for BottomSheetState
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more