pub struct AdaptivePaneState { /* private fields */ }Expand description
Retained presentation, expansion and navigation state for a single adaptive layout.
Implementations§
Source§impl AdaptivePaneState
impl AdaptivePaneState
Sourcepub fn new(initial: PaneDestination) -> Self
pub fn new(initial: PaneDestination) -> Self
Creates retained multi-pane state seeded with an initial active destination.
Sourcepub fn current_destination(&self) -> &PaneDestination
pub fn current_destination(&self) -> &PaneDestination
Returns the most recent destination on the navigation stack.
Sourcepub fn history(&self) -> &[PaneDestination]
pub fn history(&self) -> &[PaneDestination]
Returns the full navigation history stack in chronological order.
Sourcepub fn set_history_aware(&mut self, aware: bool, cx: &mut Context<'_, Self>)
pub fn set_history_aware(&mut self, aware: bool, cx: &mut Context<'_, Self>)
Controls whether prior history entries influence which secondary panes remain visible (default true).
Pushes destination onto the navigation history (if different from current) and follows navigation.
Returns whether navigating back with behavior has a valid target in history.
Sourcepub fn previous_value(
&self,
behavior: PaneBackBehavior,
) -> Option<PaneLayoutValue>
pub fn previous_value( &self, behavior: PaneBackBehavior, ) -> Option<PaneLayoutValue>
Computes the PaneLayoutValue that a back navigation with behavior would produce.
Pops history according to behavior. Returns false if back navigation is unavailable.
Sourcepub fn seek_back(
&mut self,
behavior: PaneBackBehavior,
progress: f32,
cx: &mut Context<'_, Self>,
) -> bool
pub fn seek_back( &mut self, behavior: PaneBackBehavior, progress: f32, cx: &mut Context<'_, Self>, ) -> bool
Previews a back transition without modifying history.
Sourcepub fn current_value(&self) -> PaneLayoutValue
pub fn current_value(&self) -> PaneLayoutValue
Returns the last settled layout value.
Sourcepub fn target_value(&self) -> PaneLayoutValue
pub fn target_value(&self) -> PaneLayoutValue
Returns the layout value currently settled at or transitioning toward.
Sourcepub fn snap_to(&mut self, value: PaneLayoutValue, cx: &mut Context<'_, Self>)
pub fn snap_to(&mut self, value: PaneLayoutValue, cx: &mut Context<'_, Self>)
Snaps immediately to value without animation, overriding navigation projection until Self::follow_navigation.
Sourcepub fn animate_to(&mut self, value: PaneLayoutValue, cx: &mut Context<'_, Self>)
pub fn animate_to(&mut self, value: PaneLayoutValue, cx: &mut Context<'_, Self>)
Animates to value, overriding navigation projection until Self::follow_navigation.
Sourcepub fn seek_to(
&mut self,
value: PaneLayoutValue,
progress: f32,
cx: &mut Context<'_, Self>,
)
pub fn seek_to( &mut self, value: PaneLayoutValue, progress: f32, cx: &mut Context<'_, Self>, )
Seeks partway (progress in 0.0..=1.0) toward value.
Resumes projecting pane placements automatically from navigation history and viewport directives.
Sourcepub fn expansion(
&self,
start: PaneRole,
end: PaneRole,
) -> Option<PaneExpansionAnchor>
pub fn expansion( &self, start: PaneRole, end: PaneRole, ) -> Option<PaneExpansionAnchor>
Returns the saved split anchor between start and end, if any.
Sourcepub fn set_expansion(
&mut self,
start: PaneRole,
end: PaneRole,
anchor: PaneExpansionAnchor,
cx: &mut Context<'_, Self>,
)
pub fn set_expansion( &mut self, start: PaneRole, end: PaneRole, anchor: PaneExpansionAnchor, cx: &mut Context<'_, Self>, )
Retains a logical boundary specification, applied when this pair shares a band.
Sourcepub fn clear_expansion(
&mut self,
start: PaneRole,
end: PaneRole,
cx: &mut Context<'_, Self>,
)
pub fn clear_expansion( &mut self, start: PaneRole, end: PaneRole, cx: &mut Context<'_, Self>, )
Clears any saved split anchor between start and end, restoring default sizing.
Auto Trait Implementations§
impl Forget for AdaptivePaneState
impl Freeze for AdaptivePaneState
impl Move for AdaptivePaneState
impl RefUnwindSafe for AdaptivePaneState
impl Send for AdaptivePaneState
impl Sync for AdaptivePaneState
impl Unpin for AdaptivePaneState
impl UnsafeUnpin for AdaptivePaneState
impl UnwindSafe for AdaptivePaneState
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
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> ⓘ
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> ⓘ
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