# SwipeGestureEventArgs

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

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

```rust
struct SwipeGestureEventArgs
```

Provides data for swipe gesture events.

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

## Members

- [`new`](#function-new)
- [`id`](#function-id)
- [`delta`](#function-delta)
- [`velocity`](#function-velocity)
- [`swipe_direction`](#function-swipe_direction)

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

### new

```rust
fn new(id: i32, delta: Vector, velocity: Vector) -> Self
```

Creates swipe gesture event args.

`id` is the unique identifier for this gesture, `delta` the pixel
delta since the last event and `velocity` the current swipe velocity
in pixels per second.

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

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

### id

```rust
fn id(self: &Self) -> i32
```

The unique identifier for this gesture sequence.

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

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

### delta

```rust
fn delta(self: &Self) -> Vector
```

The pixel delta since the last event.

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

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

### velocity

```rust
fn velocity(self: &Self) -> Vector
```

The current swipe velocity in pixels per second.

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

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

### swipe_direction

```rust
fn swipe_direction(self: &Self) -> SwipeDirection
```

The direction of the dominant swipe axis.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/swipe_gesture_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/)
- [`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/).
