pub struct DragDropEngine(/* private fields */);Expand description
The <perspective-viewer> drag/drop service, which manages drag/drop user
interactions across components. It is a component-level service, since only
one drag/drop action can be executed by the user at a time.
Implementations§
Source§impl DragDrop
impl DragDrop
Sourcepub fn to_props(&self) -> DragDropProps
pub fn to_props(&self) -> DragDropProps
Snapshot the drag state as a [DragDropProps] value for threading
through the component tree without PubSub subscriptions.
Sourcepub fn get_drag_column(&self) -> Option<String>
pub fn get_drag_column(&self) -> Option<String>
Get the column name currently being drag/dropped.
pub fn get_drag_target(&self) -> Option<DragTarget>
pub fn set_drag_image(&self, event: &DragEvent) -> ApiResult<()>
pub fn is_dragover(&self, drag_target: DragTarget) -> Option<(usize, String)>
pub fn notify_drop(&self, event: &DragEvent)
Sourcepub fn notify_drag_start(&self, column: String, effect: DragEffect)
pub fn notify_drag_start(&self, column: String, effect: DragEffect)
Start the drag/drop action with the name of the column being dragged.
Sourcepub fn notify_drag_end(&self)
pub fn notify_drag_end(&self)
End the drag/drop action by resetting the state to default.
Sourcepub fn notify_drag_leave(&self, drag_target: DragTarget)
pub fn notify_drag_leave(&self, drag_target: DragTarget)
Leave the action zone.
pub fn notify_drag_enter(&self, target: DragTarget, index: usize) -> bool
Trait Implementations§
Source§impl ImplicitClone for DragDrop
impl ImplicitClone for DragDrop
Source§fn implicit_clone(&self) -> Self
fn implicit_clone(&self) -> Self
This function is not magic; it is literally defined as Read more
Auto Trait Implementations§
impl Freeze for DragDrop
impl !RefUnwindSafe for DragDrop
impl !Send for DragDrop
impl !Sync for DragDrop
impl Unpin for DragDrop
impl UnsafeUnpin for DragDrop
impl !UnwindSafe for DragDrop
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
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 moreSource§impl<T> IntoPropValue<Option<T>> for T
impl<T> IntoPropValue<Option<T>> for T
Source§fn into_prop_value(self) -> Option<T>
fn into_prop_value(self) -> Option<T>
Convert
self to a value of a Properties struct.Source§impl<T> IntoPropValue<T> for T
impl<T> IntoPropValue<T> for T
Source§fn into_prop_value(self) -> T
fn into_prop_value(self) -> T
Convert
self to a value of a Properties struct.