DragDrop
struct · ferroui-base · v0.5.0
struct DragDrop
Defines the attached property and the routed events of drag-and-drop, and starts drag-and-drop operations.
Members
TYPEdrag_enter_eventdrag_leave_eventdrag_over_eventdrop_eventallow_drop_propertyget_allow_dropset_allow_dropadd_drag_enter_handlerremove_drag_enter_handleradd_drag_leave_handlerremove_drag_leave_handleradd_drag_over_handlerremove_drag_over_handleradd_drop_handlerremove_drop_handlerdo_drag_drop_async
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this type.
drag_enter_event
fn drag_enter_event() -> &'static RoutedEvent<DragEventArgs>
Event which is raised, when a drag-and-drop operation enters the element.
drag_leave_event
fn drag_leave_event() -> &'static RoutedEvent<DragEventArgs>
Event which is raised, when a drag-and-drop operation leaves the element.
drag_over_event
fn drag_over_event() -> &'static RoutedEvent<DragEventArgs>
Event which is raised, when a drag-and-drop operation is updated while over the element.
drop_event
fn drop_event() -> &'static RoutedEvent<DragEventArgs>
Event which is raised, when a drag-and-drop operation should complete over the element.
allow_drop_property
fn allow_drop_property() -> &'static AttachedProperty<bool>
Defines the AllowDrop attached property: whether the element
can be the target of a drag-and-drop operation. It is inherited.
get_allow_drop
fn get_allow_drop(interactive: &Interactive) -> bool
Gets a value indicating whether the given element can be used as the target of a drag-and-drop operation.
set_allow_drop
fn set_allow_drop(interactive: &Interactive, value: bool)
Sets a value indicating whether the given element can be used as the target of a drag-and-drop operation.
add_drag_enter_handler
fn add_drag_enter_handler(element: &Interactive, handler: impl Fn(&Interactive, &DragEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Adds a handler for the DragEnter attached event.
remove_drag_enter_handler
fn remove_drag_enter_handler(element: &Interactive, handler: RoutedEventHandlerToken)
Removes a handler for the DragEnter attached event.
add_drag_leave_handler
fn add_drag_leave_handler(element: &Interactive, handler: impl Fn(&Interactive, &DragEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Adds a handler for the DragLeave attached event.
remove_drag_leave_handler
fn remove_drag_leave_handler(element: &Interactive, handler: RoutedEventHandlerToken)
Removes a handler for the DragLeave attached event.
add_drag_over_handler
fn add_drag_over_handler(element: &Interactive, handler: impl Fn(&Interactive, &DragEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Adds a handler for the DragOver attached event.
remove_drag_over_handler
fn remove_drag_over_handler(element: &Interactive, handler: RoutedEventHandlerToken)
Removes a handler for the DragOver attached event.
add_drop_handler
fn add_drop_handler(element: &Interactive, handler: impl Fn(&Interactive, &DragEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Adds a handler for the Drop attached event.
remove_drop_handler
fn remove_drop_handler(element: &Interactive, handler: RoutedEventHandlerToken)
Removes a handler for the Drop attached event.
do_drag_drop_async
fn do_drag_drop_async(trigger_event: &PointerPressedEventArgs, data_transfer: Rc<dyn IDataTransfer>, allowed_effects: DragDropEffects) -> LocalBoxFuture<DragDropEffects>
Starts a dragging operation with the given data transfer and returns its result.
trigger_event is the pointer pressed event that triggered the
operation. data_transfer is automatically disposed when the
operation completes: it must NOT be disposed by the caller.
allowed_effects are the effects the source allows.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherStaticTypeMarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.