# DragEventArgs

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/input/struct-drageventargs/

**struct** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
struct DragEventArgs
```

Provides data for the drag-and-drop events.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/drag_event_args.rs#L9)

## Members

- [`new`](#function-new)
- [`drag_effects`](#function-drag_effects)
- [`set_drag_effects`](#function-set_drag_effects)
- [`data_transfer`](#function-data_transfer)
- [`key_modifiers`](#function-key_modifiers)
- [`get_position`](#function-get_position)

<a id="function-new"></a>

### new

```rust
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`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/drag_event_args.rs#L23)

<a id="function-drag_effects"></a>

### drag_effects

```rust
fn drag_effects(self: &Self) -> DragDropEffects
```

The effects of the operation. A handler sets them to what the
target accepts.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/drag_event_args.rs#L45)

<a id="function-set_drag_effects"></a>

### set_drag_effects

```rust
fn set_drag_effects(self: &Self, value: DragDropEffects)
```

Sets the effects of the operation.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/drag_event_args.rs#L51)

<a id="function-data_transfer"></a>

### data_transfer

```rust
fn data_transfer(self: &Self) -> &Rc<dyn IDataTransfer>
```

The data being dragged.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/drag_event_args.rs#L57)

<a id="function-key_modifiers"></a>

### key_modifiers

```rust
fn key_modifiers(self: &Self) -> KeyModifiers
```

The key modifiers held down during the event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/drag_event_args.rs#L63)

<a id="function-get_position"></a>

### get_position

```rust
fn get_position(self: &Self, relative_to: &Visual) -> Point
```

Gets the position of the pointer relative to a visual.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/drag_event_args.rs#L68)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Deref`
- [`IRoutedEventArgs`](/docs/0.5.0/api/ferroui-base/interactivity/trait-iroutedeventargs/)
- [`IKeyModifiersEventArgs`](/docs/0.5.0/api/ferroui-base/input/trait-ikeymodifierseventargs/)
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
