FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this type.

    Source

    drag_enter_event

    fn drag_enter_event() -> &'static RoutedEvent<DragEventArgs>
    

    Event which is raised, when a drag-and-drop operation enters the element.

    Source

    drag_leave_event

    fn drag_leave_event() -> &'static RoutedEvent<DragEventArgs>
    

    Event which is raised, when a drag-and-drop operation leaves the element.

    Source

    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.

    Source

    drop_event

    fn drop_event() -> &'static RoutedEvent<DragEventArgs>
    

    Event which is raised, when a drag-and-drop operation should complete over the element.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    remove_drag_enter_handler

    fn remove_drag_enter_handler(element: &Interactive, handler: RoutedEventHandlerToken)
    

    Removes a handler for the DragEnter attached event.

    Source

    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.

    Source

    remove_drag_leave_handler

    fn remove_drag_leave_handler(element: &Interactive, handler: RoutedEventHandlerToken)
    

    Removes a handler for the DragLeave attached event.

    Source

    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.

    Source

    remove_drag_over_handler

    fn remove_drag_over_handler(element: &Interactive, handler: RoutedEventHandlerToken)
    

    Removes a handler for the DragOver attached event.

    Source

    add_drop_handler

    fn add_drop_handler(element: &Interactive, handler: impl Fn(&Interactive, &DragEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    Adds a handler for the Drop attached event.

    Source

    remove_drop_handler

    fn remove_drop_handler(element: &Interactive, handler: RoutedEventHandlerToken)
    

    Removes a handler for the Drop attached event.

    Source

    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.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither
    • StaticType
    • MarkupTyped

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.