pub struct DRAG_DROP;
Expand description
Drag & drop service.
Implementations§
source§impl DRAG_DROP
impl DRAG_DROP
sourcepub fn dragging_data(&self) -> ReadOnlyArcVar<Vec<DragDropData>>
pub fn dragging_data(&self) -> ReadOnlyArcVar<Vec<DragDropData>>
All data current dragging.
sourcepub fn drag(
&self,
data: DragDropData,
allowed_effects: DragDropEffect,
) -> DragHandle
pub fn drag( &self, data: DragDropData, allowed_effects: DragDropEffect, ) -> DragHandle
Start dragging data
.
This method will only work if a DRAG_START_EVENT
is notifying. Handlers of draggable widgets
can provide custom drag data using this method.
Returns a handle that can be dropped to cancel the drag operation. A DRAG_END_EVENT
notifies
the draggable widget on cancel or drop. Logs an error message and returns a dummy handle on error.
Note that the allowed_effects
apply to all data, if a previous handler already set data with an incompatible
effect the call is an error and the data ignored.
Auto Trait Implementations§
impl Freeze for DRAG_DROP
impl RefUnwindSafe for DRAG_DROP
impl Send for DRAG_DROP
impl Sync for DRAG_DROP
impl Unpin for DRAG_DROP
impl UnwindSafe for DRAG_DROP
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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