pub struct DragEventArgs { /* private fields */ }Expand description
Provides data for the drag-and-drop events.
Implementations§
Source§impl DragEventArgs
impl DragEventArgs
Sourcepub fn new(
routed_event: Option<&RoutedEvent<DragEventArgs>>,
data_transfer: Rc<dyn IDataTransfer>,
target: Ref<Interactive>,
target_location: Point,
key_modifiers: KeyModifiers,
) -> Self
pub fn new( routed_event: Option<&RoutedEvent<DragEventArgs>>, data_transfer: Rc<dyn IDataTransfer>, target: Ref<Interactive>, target_location: Point, key_modifiers: KeyModifiers, ) -> Self
Creates drag event args. target_location is the location of the
pointer in the coordinates of target.
Sourcepub fn drag_effects(&self) -> DragDropEffects
pub fn drag_effects(&self) -> DragDropEffects
The effects of the operation. A handler sets them to what the target accepts.
Sourcepub fn set_drag_effects(&self, value: DragDropEffects)
pub fn set_drag_effects(&self, value: DragDropEffects)
Sets the effects of the operation.
Sourcepub fn data_transfer(&self) -> &Rc<dyn IDataTransfer>
pub fn data_transfer(&self) -> &Rc<dyn IDataTransfer>
The data being dragged.
Sourcepub fn key_modifiers(&self) -> KeyModifiers
pub fn key_modifiers(&self) -> KeyModifiers
The key modifiers held down during the event.
Sourcepub fn get_position(&self, relative_to: &Visual) -> Point
pub fn get_position(&self, relative_to: &Visual) -> Point
Gets the position of the pointer relative to a visual.
Methods from Deref<Target = RoutedEventArgs>§
Sourcepub fn handled(&self) -> bool
pub fn handled(&self) -> bool
Whether the routed event has already been handled.
Once handled, the event keeps travelling along its route but is only delivered to handlers registered for handled events too.
Sourcepub fn set_handled(&self, value: bool)
pub fn set_handled(&self, value: bool)
Marks the routed event as handled or unhandled.
Sourcepub fn routed_event(&self) -> Option<RoutedEvent>
pub fn routed_event(&self) -> Option<RoutedEvent>
The routed event associated with these args.
Sourcepub fn set_routed_event<T: ?Sized>(&self, value: Option<&RoutedEvent<T>>)
pub fn set_routed_event<T: ?Sized>(&self, value: Option<&RoutedEvent<T>>)
Sets the routed event associated with these args.
Sourcepub fn route(&self) -> RoutingStrategies
pub fn route(&self) -> RoutingStrategies
The routing strategy currently being applied to the event.
Sourcepub fn set_route(&self, value: RoutingStrategies)
pub fn set_route(&self, value: RoutingStrategies)
Sets the routing strategy currently being applied to the event.
Sourcepub fn source(&self) -> Option<Ref<FerroObject>>
pub fn source(&self) -> Option<Ref<FerroObject>>
The object that raised the event.
Sourcepub fn set_source(&self, value: impl Into<Nullable<FerroObject>>)
pub fn set_source(&self, value: impl Into<Nullable<FerroObject>>)
Sets the object that raised the event.
Sourcepub fn is_source(&self, object: &FerroObject) -> bool
pub fn is_source(&self, object: &FerroObject) -> bool
Whether object is the source of the event (C# e.Source == object).
Trait Implementations§
Source§impl Clone for DragEventArgs
impl Clone for DragEventArgs
Source§impl Deref for DragEventArgs
impl Deref for DragEventArgs
Source§type Target = RoutedEventArgs
type Target = RoutedEventArgs
Source§fn deref(&self) -> &RoutedEventArgs
fn deref(&self) -> &RoutedEventArgs
Source§impl IKeyModifiersEventArgs for DragEventArgs
impl IKeyModifiersEventArgs for DragEventArgs
Source§fn key_modifiers(&self) -> KeyModifiers
fn key_modifiers(&self) -> KeyModifiers
Source§impl IRoutedEventArgs for DragEventArgs
impl IRoutedEventArgs for DragEventArgs
Source§fn as_routed_event_args(&self) -> &RoutedEventArgs
fn as_routed_event_args(&self) -> &RoutedEventArgs
Source§fn query_args(&self, type_id: TypeId) -> Option<&dyn Any>
fn query_args(&self, type_id: TypeId) -> Option<&dyn Any>
type_id, if
the args are of that type or of a type derived from it.Source§fn is_args_type(type_id: TypeId) -> bool
fn is_args_type(type_id: TypeId) -> bool
type_id or is
derived from it.handled, the source, a cancel flag, ..) is shared with them.Source§impl MarkupTyped for DragEventArgs
impl MarkupTyped for DragEventArgs
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
Auto Trait Implementations§
impl !RefUnwindSafe for DragEventArgs
impl !Send for DragEventArgs
impl !Sync for DragEventArgs
impl !UnwindSafe for DragEventArgs
impl Freeze for DragEventArgs
impl Unpin for DragEventArgs
impl UnsafeUnpin for DragEventArgs
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> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more