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.
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.
DEFAULT_OPACITY
const DEFAULT_OPACITY: f64
The default opacity of show (the default argument of the reference).
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.
hide
fn hide()
Hides the preview if shown.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyClassDefaultsErasedDestructorIntoEither
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.