pub struct Dock<P, I>(/* private fields */);Expand description
Keep one controller on the view that renders the whole docking surface.
Implementations§
Source§impl<P: Clone + PartialEq + 'static, I: Clone + PartialEq + 'static> Dock<P, I>
impl<P: Clone + PartialEq + 'static, I: Clone + PartialEq + 'static> Dock<P, I>
Sourcepub fn new(
painter: Painter,
ghost: impl Fn(&I, &mut Window, &mut App) -> AnyElement + 'static,
) -> Self
pub fn new( painter: Painter, ghost: impl Fn(&I, &mut Window, &mut App) -> AnyElement + 'static, ) -> Self
ghost renders the detached item and its brief settle after a drop.
Sourcepub fn surface(
&self,
id: impl Into<ElementId>,
child: impl IntoElement,
) -> Surface<P, I>
pub fn surface( &self, id: impl Into<ElementId>, child: impl IntoElement, ) -> Surface<P, I>
Mount every target inside this surface, in the controller’s owning view.
It takes any drag carrying a crate::drag::Carry<I> while
crate::drag::Carry::claimed is false.
Sourcepub fn pane(
&self,
id: P,
bar_height: Pixels,
child: impl IntoElement,
) -> Pane<P, I>
pub fn pane( &self, id: P, bar_height: Pixels, child: impl IntoElement, ) -> Pane<P, I>
Measure a pane and animate its entry after an accepted drop.
Trait Implementations§
Auto Trait Implementations§
impl<P, I> !RefUnwindSafe for Dock<P, I>
impl<P, I> !Send for Dock<P, I>
impl<P, I> !Sync for Dock<P, I>
impl<P, I> !UnwindSafe for Dock<P, I>
impl<P, I> Forget for Dock<P, I>
impl<P, I> Freeze for Dock<P, I>
impl<P, I> Move for Dock<P, I>
impl<P, I> Unpin for Dock<P, I>
impl<P, I> UnsafeUnpin for Dock<P, I>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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