pub struct DragAndDropState { /* private fields */ }Expand description
The one transfer in flight in an app context, the targets attached in it, and the steps the source recorded since the shell last routed.
Implementations§
Source§impl DragAndDropState
impl DragAndDropState
Sourcepub fn is_target(&self, node: usize) -> bool
pub fn is_target(&self, node: usize) -> bool
Whether node carries a drag_and_drop_target right now.
Sourcepub fn route(
&self,
find_target: impl FnMut(DragAndDropPoint) -> Option<(usize, Point)>,
) -> bool
pub fn route( &self, find_target: impl FnMut(DragAndDropPoint) -> Option<(usize, Point)>, ) -> bool
Delivers every step recorded since the last call. find_target
names the target node under a point and the point in that node’s
surface; the shell answers it from its surfaces and their positions
on the screen. Returns whether anything was delivered.
Trait Implementations§
Source§impl Default for DragAndDropState
impl Default for DragAndDropState
Source§fn default() -> DragAndDropState
fn default() -> DragAndDropState
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl !Freeze for DragAndDropState
impl !RefUnwindSafe for DragAndDropState
impl !Send for DragAndDropState
impl !Sync for DragAndDropState
impl !UnwindSafe for DragAndDropState
impl Unpin for DragAndDropState
impl UnsafeUnpin for DragAndDropState
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> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Convert
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Convert
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.