pub enum DragMsg {
Pressed(PathBuf, bool),
Entered(PathBuf),
Exited(PathBuf),
Released(PathBuf),
Cancelled,
}Expand description
Opaque drag-machinery event produced by the widget’s internal mouse-area instrumentation.
Applications should treat these as opaque payloads and route
them back to DirectoryTree::update
unchanged — exactly like
LoadPayload. Apps generally never
construct these variants by hand.
Variants§
Pressed(PathBuf, bool)
Mouse button was pressed on a row. The bool indicates whether the row is a directory (relevant for valid-target checks later if that row happens to be the release point).
Entered(PathBuf)
Cursor entered a row while a drag is in progress. The widget decides whether the row is a valid drop target.
Exited(PathBuf)
Cursor left a row while a drag is in progress.
Released(PathBuf)
Mouse button was released on a row. The widget inspects its
drag state to decide whether this was a click (same row as
press → emit a delayed Selected), a successful drop
(hover target set → emit DragCompleted), or a cancelled
drag (release on non-target → quietly clear state).
Cancelled
External cancellation signal. Emitted by the widget itself
when the user presses Escape while a drag is in flight,
or by the application if it wants to abort a drag for its
own reasons (e.g. a modal opened). Clearing drag state is
idempotent, so this is safe to call speculatively.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for DragMsg
impl RefUnwindSafe for DragMsg
impl Send for DragMsg
impl Sync for DragMsg
impl Unpin for DragMsg
impl UnsafeUnpin for DragMsg
impl UnwindSafe for DragMsg
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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>
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>
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)
&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)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
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<State, Message> IntoBoot<State, Message> for State
impl<State, Message> IntoBoot<State, Message> for State
Source§fn into_boot(self) -> (State, Task<Message>)
fn into_boot(self) -> (State, Task<Message>)
Application.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