pub struct DragHoveredArgs {
pub timestamp: DInstant,
pub prev_target: Option<InteractionPath>,
pub target: Option<InteractionPath>,
pub position: Point2D<Dip, Dip>,
pub hits: HitTestInfo,
/* private fields */
}
Expand description
Arguments for DRAG_HOVERED_EVENT
.
Fields§
§timestamp: DInstant
Instant the event happened.
prev_target: Option<InteractionPath>
Previous hovered target.
target: Option<InteractionPath>
New hovered target.
position: Point2D<Dip, Dip>
Position of the cursor in the window’s content area.
hits: HitTestInfo
Hit-test result for the cursor point in the window.
Implementations§
source§impl DragHoveredArgs
impl DragHoveredArgs
sourcepub fn new(
timestamp: impl Into<DInstant>,
propagation_handle: EventPropagationHandle,
prev_target: impl Into<Option<InteractionPath>>,
target: impl Into<Option<InteractionPath>>,
position: impl Into<Point2D<Dip, Dip>>,
hits: impl Into<HitTestInfo>,
) -> DragHoveredArgs
pub fn new( timestamp: impl Into<DInstant>, propagation_handle: EventPropagationHandle, prev_target: impl Into<Option<InteractionPath>>, target: impl Into<Option<InteractionPath>>, position: impl Into<Point2D<Dip, Dip>>, hits: impl Into<HitTestInfo>, ) -> DragHoveredArgs
New args from values that convert into the argument types.
sourcepub fn now(
prev_target: impl Into<Option<InteractionPath>>,
target: impl Into<Option<InteractionPath>>,
position: impl Into<Point2D<Dip, Dip>>,
hits: impl Into<HitTestInfo>,
) -> DragHoveredArgs
pub fn now( prev_target: impl Into<Option<InteractionPath>>, target: impl Into<Option<InteractionPath>>, position: impl Into<Point2D<Dip, Dip>>, hits: impl Into<HitTestInfo>, ) -> DragHoveredArgs
Arguments for event that happened now (INSTANT.now
).
source§impl DragHoveredArgs
impl DragHoveredArgs
sourcepub fn data(&self) -> ReadOnlyVar<Vec<DragDropData>, ArcVar<Vec<DragDropData>>>
pub fn data(&self) -> ReadOnlyVar<Vec<DragDropData>, ArcVar<Vec<DragDropData>>>
Gets the DRAG_DROP.dragging_data
.
sourcepub fn is_drag_enter(&self) -> bool
pub fn is_drag_enter(&self) -> bool
Returns true
if the WIDGET
was not hovered, but now is.
sourcepub fn is_drag_leave(&self) -> bool
pub fn is_drag_leave(&self) -> bool
Returns true
if the WIDGET
was hovered, but now isn’t.
sourcepub fn was_over(&self) -> bool
pub fn was_over(&self) -> bool
Returns true
if the WIDGET
is in prev_target
.
sourcepub fn was_enabled(&self, widget_id: WidgetId) -> bool
pub fn was_enabled(&self, widget_id: WidgetId) -> bool
Returns true
if the widget was enabled in prev_target
.
sourcepub fn was_disabled(&self, widget_id: WidgetId) -> bool
pub fn was_disabled(&self, widget_id: WidgetId) -> bool
Returns true
if the widget was disabled in prev_target
.
sourcepub fn is_enabled(&self, widget_id: WidgetId) -> bool
pub fn is_enabled(&self, widget_id: WidgetId) -> bool
Returns true
if the widget is enabled in target
.
sourcepub fn is_disabled(&self, widget_id: WidgetId) -> bool
pub fn is_disabled(&self, widget_id: WidgetId) -> bool
Returns true
if the widget is disabled in target
.
sourcepub fn is_drag_enter_enabled(&self) -> bool
pub fn is_drag_enter_enabled(&self) -> bool
Returns true
if the WIDGET
was not hovered or was disabled, but now is hovered and enabled.
sourcepub fn is_drag_leave_enabled(&self) -> bool
pub fn is_drag_leave_enabled(&self) -> bool
Returns true
if the WIDGET
was hovered and enabled, but now is not hovered or is disabled.
sourcepub fn is_drag_enter_disabled(&self) -> bool
pub fn is_drag_enter_disabled(&self) -> bool
Returns true
if the WIDGET
was not hovered or was enabled, but now is hovered and disabled.
sourcepub fn is_drag_leave_disabled(&self) -> bool
pub fn is_drag_leave_disabled(&self) -> bool
Returns true
if the WIDGET
was hovered and disabled, but now is not hovered or is enabled.
Trait Implementations§
source§impl AnyEventArgs for DragHoveredArgs
impl AnyEventArgs for DragHoveredArgs
source§fn clone_any(&self) -> Box<dyn AnyEventArgs>
fn clone_any(&self) -> Box<dyn AnyEventArgs>
source§fn delivery_list(&self, list: &mut UpdateDeliveryList)
fn delivery_list(&self, list: &mut UpdateDeliveryList)
UpdateDeliveryList
.source§fn propagation(&self) -> &EventPropagationHandle
fn propagation(&self) -> &EventPropagationHandle
source§impl Clone for DragHoveredArgs
impl Clone for DragHoveredArgs
source§fn clone(&self) -> DragHoveredArgs
fn clone(&self) -> DragHoveredArgs
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for DragHoveredArgs
impl Debug for DragHoveredArgs
Auto Trait Implementations§
impl Freeze for DragHoveredArgs
impl RefUnwindSafe for DragHoveredArgs
impl Send for DragHoveredArgs
impl Sync for DragHoveredArgs
impl Unpin for DragHoveredArgs
impl UnwindSafe for DragHoveredArgs
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
source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for T
source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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