pub struct PaneScaffold<K: Clone + PartialEq + 'static> { /* private fields */ }Expand description
A list-detail or supporting pane layout around caller-owned panes.
Panes adapt to the scaffold’s own width, so a layout inside a navigation suite adapts to the room it has. Give it a definite height. Each pane scrolls on its own, and focus follows the destination and returns on back.
The navigator is controlled: call its navigate_to and navigate_back in
your handlers, and notify its entity.
Implementations§
Source§impl<K: Clone + PartialEq + 'static> PaneScaffold<K>
impl<K: Clone + PartialEq + 'static> PaneScaffold<K>
Sourcepub fn list_detail(
id: impl Into<ElementId>,
navigator: &Entity<PaneNavigator<K>>,
) -> Self
pub fn list_detail( id: impl Into<ElementId>, navigator: &Entity<PaneNavigator<K>>, ) -> Self
A list-detail layout: list, detail, then the optional extra pane.
Sourcepub fn supporting_pane(
id: impl Into<ElementId>,
navigator: &Entity<PaneNavigator<K>>,
) -> Self
pub fn supporting_pane( id: impl Into<ElementId>, navigator: &Entity<PaneNavigator<K>>, ) -> Self
A supporting pane layout: main, supporting, then the optional extra pane.
Sourcepub fn pane(
self,
role: PaneRole,
label: impl Into<SharedString>,
content: impl IntoElement,
) -> Self
pub fn pane( self, role: PaneRole, label: impl Into<SharedString>, content: impl IntoElement, ) -> Self
Supply a pane; label names its region for assistive technology.
Sourcepub fn size_class(self, size_class: Option<WindowSizeClass>) -> Self
pub fn size_class(self, size_class: Option<WindowSizeClass>) -> Self
Classify this size instead of the scaffold’s own, for a layout shown
smaller than the window it stands for, as previews are. None reads
the scaffold’s width.
Sourcepub fn preferred_width(self, role: PaneRole, width: f32) -> Self
pub fn preferred_width(self, role: PaneRole, width: f32) -> Self
A pane’s preferred width in dp, overriding the directive’s.
Sourcepub fn drag_handle(self, label: impl Into<SharedString>) -> Self
pub fn drag_handle(self, label: impl Into<SharedString>) -> Self
Show a drag handle between two panes; label is its accessible name.
It takes a drag, the arrows, Home, End, and Enter for the next anchor.
Sourcepub fn anchors(self, anchors: impl IntoIterator<Item = PaneAnchor>) -> Self
pub fn anchors(self, anchors: impl IntoIterator<Item = PaneAnchor>) -> Self
The positions the handle settles at.
Trait Implementations§
Source§impl<K: Clone + PartialEq + 'static> IntoElement for PaneScaffold<K>
impl<K: Clone + PartialEq + 'static> IntoElement for PaneScaffold<K>
Source§type Element = ViewElement<PaneScaffold<K>>
type Element = ViewElement<PaneScaffold<K>>
Source§fn into_element(self) -> Self::Element
fn into_element(self) -> Self::Element
Element].Source§fn into_any_element(self) -> AnyElement
fn into_any_element(self) -> AnyElement
AnyElement].Source§impl<K: Clone + PartialEq + 'static> RenderOnce for PaneScaffold<K>
impl<K: Clone + PartialEq + 'static> RenderOnce for PaneScaffold<K>
Auto Trait Implementations§
impl<K> !RefUnwindSafe for PaneScaffold<K>
impl<K> !Send for PaneScaffold<K>
impl<K> !Sync for PaneScaffold<K>
impl<K> !UnwindSafe for PaneScaffold<K>
impl<K> Freeze for PaneScaffold<K>
impl<K> Unpin for PaneScaffold<K>
impl<K> UnsafeUnpin for PaneScaffold<K>
Blanket Implementations§
§impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
§fn with_animation(
self,
id: impl Into<ElementId>,
animation: Animation,
animator: impl Fn(Self, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
fn with_animation(
self,
id: impl Into<ElementId>,
animation: Animation,
animator: impl Fn(Self, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
§fn with_animations(
self,
id: impl Into<ElementId>,
animations: Vec<Animation>,
animator: impl Fn(Self, usize, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
fn with_animations(
self,
id: impl Into<ElementId>,
animations: Vec<Animation>,
animator: impl Fn(Self, usize, f32) -> Self + 'static,
) -> AnimationElement<Self>where
Self: Sized,
§fn with_spring<T>(
self,
id: impl Into<ElementId>,
animation: SpringAnimation<T>,
animator: impl FnOnce(Self, <T as SpringTarget>::Output) -> Self + 'static,
) -> SpringAnimationElement<Self>where
Self: Sized,
T: SpringTarget,
<T as SpringTarget>::Output: 'static,
fn with_spring<T>(
self,
id: impl Into<ElementId>,
animation: SpringAnimation<T>,
animator: impl FnOnce(Self, <T as SpringTarget>::Output) -> Self + 'static,
) -> SpringAnimationElement<Self>where
Self: Sized,
T: SpringTarget,
<T as SpringTarget>::Output: 'static,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
impl<T> AutoreleaseSafe for Twhere
T: ?Sized,
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> FluentBuilder for Twhere
T: IntoElement,
impl<T> FluentBuilder for Twhere
T: IntoElement,
§fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
§fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere
Self: Sized,
fn when(self, condition: bool, then: impl FnOnce(Self) -> Self) -> Selfwhere
Self: Sized,
§fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Selfwhere
Self: Sized,
fn when_else(
self,
condition: bool,
then: impl FnOnce(Self) -> Self,
else_fn: impl FnOnce(Self) -> Self,
) -> Selfwhere
Self: Sized,
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> 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§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
§impl<E> TestTextExt for Ewhere
E: IntoElement,
impl<E> TestTextExt for Ewhere
E: IntoElement,
§fn test_text(self, text: impl Into<SharedString>) -> Self::Element
fn test_text(self, text: impl Into<SharedString>) -> Self::Element
test-support, records text each time the element paints.
Otherwise returns the element it builds.§fn test_alt_text(self, text: impl Into<SharedString>) -> Self::Element
fn test_alt_text(self, text: impl Into<SharedString>) -> Self::Element
Self::test_text] for an image’s alternative text, which
stands in for what the element draws.