FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    DragPreviewService

    struct · ferroui-xaml-interactions-draganddrop · v0.5.0

    struct DragPreviewService
    

    Provides a lightweight preview window shown during a managed drag operation.

    Deviation (DEVIATIONS.md, Behaviors): the preview window of the reference is shared by the threads of the process; a window belongs to the thread that uses it, so there is one per thread.

    View source

    Members

    show

    fn show(content: Option<BoxedValue>, template: Option<Rc<dyn IDataTemplate>>, origin: &TopLevel, client_position: Point, logical_offset: Point, opacity: f64)
    

    Shows a drag preview near the current pointer position.

    content is rendered inside the preview window, with template when there is one; origin is the top-level where the drag originates, client_position the current pointer position in its client coordinates, logical_offset a logical offset added to the preview position in client coordinates and opacity the preview window opacity, clamped to 0..1.

    Source

    DEFAULT_OPACITY

    const DEFAULT_OPACITY: f64
    

    The default opacity of show (the default argument of the reference).

    Source

    move_

    fn move_(origin: &TopLevel, client_position: Point, logical_offset: Point)
    

    Moves the drag preview to a new client position of origin, plus logical_offset.

    Source

    hide

    fn hide()
    

    Hides the preview if shown.

    Source

    Trait implementations

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

    Availability

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