pub struct DragDropManager {
pub active_drag: Option<DragContext>,
}Expand description
Manager for drag-and-drop operations
DEPRECATED: Use GestureAndDragManager with DragContext instead.
This type is kept for backwards compatibility only.
Fields§
§active_drag: Option<DragContext>Currently active drag operation (using new unified system)
Implementations§
Source§impl DragDropManager
impl DragDropManager
Sourcepub fn start_node_drag(&mut self, source_node: DomNodeId)
pub fn start_node_drag(&mut self, source_node: DomNodeId)
Start a node drag operation
Sourcepub fn start_file_drag(&mut self, file_path: AzString)
pub fn start_file_drag(&mut self, file_path: AzString)
Start a file drag operation
Sourcepub fn set_drop_target(&mut self, target: Option<DomNodeId>)
pub fn set_drop_target(&mut self, target: Option<DomNodeId>)
Update the current drop target
Sourcepub fn end_drag(&mut self) -> Option<DragContext>
pub fn end_drag(&mut self) -> Option<DragContext>
End the drag operation and return the final context
Sourcepub fn is_dragging(&self) -> bool
pub fn is_dragging(&self) -> bool
Check if a drag operation is active
Sourcepub fn is_dragging_node(&self) -> bool
pub fn is_dragging_node(&self) -> bool
Check if currently dragging a node
Sourcepub fn is_dragging_file(&self) -> bool
pub fn is_dragging_file(&self) -> bool
Check if currently dragging a file
Sourcepub fn get_drag_context(&self) -> Option<&DragContext>
pub fn get_drag_context(&self) -> Option<&DragContext>
Get the active drag context
Sourcepub fn get_drag_state(&self) -> Option<DragState>
pub fn get_drag_state(&self) -> Option<DragState>
Get the active drag state (old API for backwards compatibility)
Sourcepub fn cancel_drag(&mut self)
pub fn cancel_drag(&mut self)
Cancel the current drag operation
Trait Implementations§
Source§impl Clone for DragDropManager
impl Clone for DragDropManager
Source§fn clone(&self) -> DragDropManager
fn clone(&self) -> DragDropManager
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for DragDropManager
impl Debug for DragDropManager
Source§impl Default for DragDropManager
impl Default for DragDropManager
Source§fn default() -> DragDropManager
fn default() -> DragDropManager
Returns the “default value” for a type. Read more
Source§impl PartialEq for DragDropManager
impl PartialEq for DragDropManager
impl StructuralPartialEq for DragDropManager
Auto Trait Implementations§
impl Freeze for DragDropManager
impl RefUnwindSafe for DragDropManager
impl Send for DragDropManager
impl Sync for DragDropManager
impl Unpin for DragDropManager
impl UnwindSafe for DragDropManager
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> 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