pub struct ResizablePanelGroup { /* private fields */ }Expand description
A group of resizable panels.
Implementations§
Source§impl ResizablePanelGroup
impl ResizablePanelGroup
Sourcepub fn with_handle_appearance(self, appearance: ResizeHandleRenderer) -> Self
pub fn with_handle_appearance(self, appearance: ResizeHandleRenderer) -> Self
Hand the painted part of every divider in this group to appearance.
The hit area, the cursor and the drag stay here; a renderer that
returns None for a given handle leaves the built-in line on it.
Sourcepub fn with_state(self, state: &Entity<ResizableState>) -> Self
pub fn with_state(self, state: &Entity<ResizableState>) -> Self
Bind yourself to a resizable state entity.
If not provided, it will handle its own state internally.
Sourcepub fn axis(self, axis: Axis) -> Self
pub fn axis(self, axis: Axis) -> Self
Set the axis of the resizable panel group, default is horizontal.
Sourcepub fn child(self, panel: impl Into<ResizablePanel>) -> Self
pub fn child(self, panel: impl Into<ResizablePanel>) -> Self
Add a panel to the group.
- The
axiswill be set to the same axis as the group. - The
initial_sizewill be set to the average size of all panels if not provided. - The
groupwill be set to the group entity.
Sourcepub fn children<I>(self, panels: impl IntoIterator<Item = I>) -> Selfwhere
I: Into<ResizablePanel>,
pub fn children<I>(self, panels: impl IntoIterator<Item = I>) -> Selfwhere
I: Into<ResizablePanel>,
Add multiple panels to the group.
Trait Implementations§
impl EventEmitter<ResizablePanelEvent> for ResizablePanelGroup
Source§impl From<ResizablePanelGroup> for ResizablePanel
impl From<ResizablePanelGroup> for ResizablePanel
Source§fn from(value: ResizablePanelGroup) -> Self
fn from(value: ResizablePanelGroup) -> Self
Converts to this type from the input type.
Source§impl IntoElement for ResizablePanelGroup
impl IntoElement for ResizablePanelGroup
Source§type Element = ViewElement<ResizablePanelGroup>
type Element = ViewElement<ResizablePanelGroup>
The specific type of element into which the implementing type is converted.
Useful for converting other types into elements automatically, like Strings
Source§fn into_element(self) -> Self::Element
fn into_element(self) -> Self::Element
Convert self into a type that implements
Element.Source§fn into_any_element(self) -> AnyElement
fn into_any_element(self) -> AnyElement
Convert self into a dynamically-typed
AnyElement.Source§impl RenderOnce for ResizablePanelGroup
impl RenderOnce for ResizablePanelGroup
Source§fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement
fn render(self, window: &mut Window, cx: &mut App) -> impl IntoElement
Render this component into an element tree. Note that this method
takes ownership of self, as compared to
Render::render() method
which takes a mutable reference.Auto Trait Implementations§
impl !RefUnwindSafe for ResizablePanelGroup
impl !Send for ResizablePanelGroup
impl !Sync for ResizablePanelGroup
impl !UnwindSafe for ResizablePanelGroup
impl Forget for ResizablePanelGroup
impl Freeze for ResizablePanelGroupwhere
NonZero<u32>: Freeze,
&'static str: Freeze,
*const ArcInner<str> is !null: Freeze,
PhantomData<ArcInner<str>>: Freeze,
*const ArcInner<Path> is !null: Freeze,
PhantomData<ArcInner<Path>>: Freeze,
*const str is !null: Freeze,
PhantomData<&'static str>: Freeze,
*const ArcInner<ElementId> is !null: Freeze,
PhantomData<ArcInner<ElementId>>: Freeze,
*const (): Freeze,
*const ArcInner<RwLock<RawRwLock, EntityRefCounts>> is !null: Freeze,
PhantomData<fn(ResizableState) -> ResizableState>: Freeze,
*const u8 is !null: Freeze,
PhantomData<ResizablePanel>: Freeze,
*const RcInner<dyn Fn(&Entity<ResizableState>, &mut Window, &mut App)> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&Entity<ResizableState>, &mut Window, &mut App)>>: Freeze,
*const RcInner<dyn Fn(&ResizeHandleContext, &mut Window, &mut App) -> Option<AnyElement>> is !null: Freeze,
PhantomData<RcInner<dyn Fn(&ResizeHandleContext, &mut Window, &mut App) -> Option<AnyElement>>>: Freeze,
impl Move for ResizablePanelGroup
impl Unpin for ResizablePanelGroupwhere
NonZero<u32>: Unpin,
&'static str: Unpin,
Arc<str>: Unpin,
Arc<Path>: Unpin,
*const str is !null: Unpin,
Arc<ElementId>: Unpin,
*const (): Unpin,
*const ArcInner<RwLock<RawRwLock, EntityRefCounts>> is !null: Unpin,
*const u8 is !null: Unpin,
*mut dyn ElementObject: Unpin,
Rc<Cell<bool>>: Unpin,
Arc<Vec<(String, u32)>>: Unpin,
Arc<Vec<String>>: Unpin,
Rc<dyn Fn(&ResizeHandleContext, &mut Window, &mut App) -> Option<AnyElement>>: Unpin,
Rc<dyn Fn(&Entity<ResizableState>, &mut Window, &mut App)>: Unpin,
impl UnsafeUnpin for ResizablePanelGroupwhere
NonZeroU32Inner: UnsafeUnpin,
&'static str: UnsafeUnpin,
*const ArcInner<str> is !null: UnsafeUnpin,
PhantomData<ArcInner<str>>: UnsafeUnpin,
*const ArcInner<Path> is !null: UnsafeUnpin,
PhantomData<ArcInner<Path>>: UnsafeUnpin,
*const str is !null: UnsafeUnpin,
PhantomData<&'static str>: UnsafeUnpin,
*const ArcInner<ElementId> is !null: UnsafeUnpin,
PhantomData<ArcInner<ElementId>>: UnsafeUnpin,
*const (): UnsafeUnpin,
*const ArcInner<RwLock<RawRwLock, EntityRefCounts>> is !null: UnsafeUnpin,
PhantomData<fn(ResizableState) -> ResizableState>: UnsafeUnpin,
*const u8 is !null: UnsafeUnpin,
PhantomData<ResizablePanel>: UnsafeUnpin,
*const RcInner<dyn Fn(&Entity<ResizableState>, &mut Window, &mut App)> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&Entity<ResizableState>, &mut Window, &mut App)>>: UnsafeUnpin,
*const RcInner<dyn Fn(&ResizeHandleContext, &mut Window, &mut App) -> Option<AnyElement>> is !null: UnsafeUnpin,
PhantomData<RcInner<dyn Fn(&ResizeHandleContext, &mut Window, &mut App) -> Option<AnyElement>>>: UnsafeUnpin,
Blanket Implementations§
Source§impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
impl<E> AnimationExt for Ewhere
E: IntoElement + 'static,
Source§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,
Render this component or element with an animation
Source§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,
Render this component or element with a chain of animations
Source§fn with_spring<T>(
self,
id: impl Into<ElementId>,
animation: SpringAnimation<T>,
animator: impl FnOnce(Self, <T as SpringTarget>::Output) -> Self + 'static,
) -> SpringAnimationElement<Self>
fn with_spring<T>( self, id: impl Into<ElementId>, animation: SpringAnimation<T>, animator: impl FnOnce(Self, <T as SpringTarget>::Output) -> Self + 'static, ) -> SpringAnimationElement<Self>
Renders this component or element at the value produced by a spring. Read more
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> FluentBuilder for Twhere
T: IntoElement,
impl<T> FluentBuilder for Twhere
T: IntoElement,
Source§fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
fn map<U>(self, f: impl FnOnce(Self) -> U) -> Uwhere
Self: Sized,
Imperatively modify self with the given closure.
Source§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,
Conditionally modify self with the given closure.
Source§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,
Conditionally modify self with the given closure.
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<E> TestTextExt for Ewhere
E: IntoElement,
impl<E> TestTextExt for Ewhere
E: IntoElement,
Source§fn test_text(
self,
text: impl Into<SharedString>,
) -> ObservedTextElement<Self::Element>
fn test_text( self, text: impl Into<SharedString>, ) -> ObservedTextElement<Self::Element>
With
test-support, records text each time the element paints.
Otherwise returns the element it builds.Source§fn test_alt_text(
self,
text: impl Into<SharedString>,
) -> ObservedTextElement<Self::Element>
fn test_alt_text( self, text: impl Into<SharedString>, ) -> ObservedTextElement<Self::Element>
Like
Self::test_text for an image’s alternative text, which
stands in for what the element draws.