# SwipeGestureRecognizer

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

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

```rust
struct SwipeGestureRecognizer
```

A gesture recognizer that detects swipe gestures and raises the swipe
gesture event continuously as the pointer moves.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`can_horizontally_swipe_property`](#function-can_horizontally_swipe_property)
- [`can_vertically_swipe_property`](#function-can_vertically_swipe_property)
- [`threshold_property`](#function-threshold_property)
- [`is_mouse_enabled_property`](#function-is_mouse_enabled_property)
- [`is_enabled_property`](#function-is_enabled_property)
- [`new`](#function-new)
- [`can_horizontally_swipe`](#function-can_horizontally_swipe)
- [`set_can_horizontally_swipe`](#function-set_can_horizontally_swipe)
- [`can_vertically_swipe`](#function-can_vertically_swipe)
- [`set_can_vertically_swipe`](#function-set_can_vertically_swipe)
- [`threshold`](#function-threshold)
- [`set_threshold`](#function-set_threshold)
- [`is_mouse_enabled`](#function-is_mouse_enabled)
- [`set_is_mouse_enabled`](#function-set_is_mouse_enabled)
- [`is_enabled`](#function-is_enabled)
- [`set_is_enabled`](#function-set_is_enabled)

<a id="assoc_const-type"></a>

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

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

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<SwipeGestureRecognizer>
```

Returns a strong reference to this object.

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

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

### can_horizontally_swipe_property

```rust
fn can_horizontally_swipe_property() -> &'static StyledProperty<bool>
```

Defines the `CanHorizontallySwipe` property.

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

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

### can_vertically_swipe_property

```rust
fn can_vertically_swipe_property() -> &'static StyledProperty<bool>
```

Defines the `CanVerticallySwipe` property.

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

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

### threshold_property

```rust
fn threshold_property() -> &'static StyledProperty<f64>
```

Defines the `Threshold` property.

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

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

### is_mouse_enabled_property

```rust
fn is_mouse_enabled_property() -> &'static StyledProperty<bool>
```

Defines the `IsMouseEnabled` property.

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

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

### is_enabled_property

```rust
fn is_enabled_property() -> &'static StyledProperty<bool>
```

Defines the `IsEnabled` property.

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

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

### new

```rust
fn new() -> Ref<Self>
```



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

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

### can_horizontally_swipe

```rust
fn can_horizontally_swipe(self: &Self) -> bool
```

Whether horizontal swipes are tracked.

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

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

### set_can_horizontally_swipe

```rust
fn set_can_horizontally_swipe(self: &Self, value: bool)
```



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

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

### can_vertically_swipe

```rust
fn can_vertically_swipe(self: &Self) -> bool
```

Whether vertical swipes are tracked.

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

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

### set_can_vertically_swipe

```rust
fn set_can_vertically_swipe(self: &Self, value: bool)
```



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

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

### threshold

```rust
fn threshold(self: &Self) -> f64
```

The minimum pointer movement in pixels before a swipe is recognized.
A value of 0 (the default) uses half of the platform's touch tap
size.

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

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

### set_threshold

```rust
fn set_threshold(self: &Self, value: f64)
```



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

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

### is_mouse_enabled

```rust
fn is_mouse_enabled(self: &Self) -> bool
```

Whether mouse pointer events trigger swipe gestures. Defaults to
false; touch and pen are always enabled.

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

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

### set_is_mouse_enabled

```rust
fn set_is_mouse_enabled(self: &Self, value: bool)
```



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

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

### is_enabled

```rust
fn is_enabled(self: &Self) -> bool
```

Whether this recognizer responds to pointer events. Defaults to
true.

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

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

### set_is_enabled

```rust
fn set_is_enabled(self: &Self, value: bool)
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`GestureRecognizerImplExt`](/docs/0.5.0/api/ferroui-base/input/gesture_recognizers/trait-gesturerecognizerimplext/)
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`StyledElementImplExt`](/docs/0.5.0/api/ferroui-base/trait-styledelementimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<SwipeGestureRecognizer>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`DefaultConstructible`](/docs/0.5.0/api/ferroui-base/trait-defaultconstructible/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`GestureRecognizerImpl`](/docs/0.5.0/api/ferroui-base/input/gesture_recognizers/trait-gesturerecognizerimpl/)

## Availability

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