# ScrollGestureRecognizer

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

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

```rust
struct ScrollGestureRecognizer
```

Recognizes the scroll gesture: a touch or pen drag, optionally followed
by inertia.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`INERTIAL_SCROLL_SPEED_END`](#assoc_const-inertial_scroll_speed_end)
- [`INERTIAL_RESISTANCE`](#assoc_const-inertial_resistance)
- [`can_horizontally_scroll_property`](#function-can_horizontally_scroll_property)
- [`can_vertically_scroll_property`](#function-can_vertically_scroll_property)
- [`is_scroll_inertia_enabled_property`](#function-is_scroll_inertia_enabled_property)
- [`scroll_start_distance_property`](#function-scroll_start_distance_property)
- [`offset_property`](#function-offset_property)
- [`extent_property`](#function-extent_property)
- [`viewport_property`](#function-viewport_property)
- [`new`](#function-new)
- [`can_horizontally_scroll`](#function-can_horizontally_scroll)
- [`set_can_horizontally_scroll`](#function-set_can_horizontally_scroll)
- [`can_vertically_scroll`](#function-can_vertically_scroll)
- [`set_can_vertically_scroll`](#function-set_can_vertically_scroll)
- [`is_scroll_inertia_enabled`](#function-is_scroll_inertia_enabled)
- [`set_is_scroll_inertia_enabled`](#function-set_is_scroll_inertia_enabled)
- [`scroll_start_distance`](#function-scroll_start_distance)
- [`set_scroll_start_distance`](#function-set_scroll_start_distance)
- [`extent`](#function-extent)
- [`set_extent`](#function-set_extent)
- [`offset`](#function-offset)
- [`set_offset`](#function-set_offset)
- [`viewport`](#function-viewport)
- [`set_viewport`](#function-set_viewport)

<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/scroll_gesture_recognizer.rs#L57)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### INERTIAL_SCROLL_SPEED_END

```rust
const INERTIAL_SCROLL_SPEED_END: f64
```

Pixels per second speed that is considered to be the stop of
inertial scroll.

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

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

### INERTIAL_RESISTANCE

```rust
const INERTIAL_RESISTANCE: f64
```

The resistance applied to inertial scrolling.

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

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

### can_horizontally_scroll_property

```rust
fn can_horizontally_scroll_property() -> &'static DirectProperty<ScrollGestureRecognizer, bool>
```

Defines the `CanHorizontallyScroll` property.

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

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

### can_vertically_scroll_property

```rust
fn can_vertically_scroll_property() -> &'static DirectProperty<ScrollGestureRecognizer, bool>
```

Defines the `CanVerticallyScroll` property.

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

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

### is_scroll_inertia_enabled_property

```rust
fn is_scroll_inertia_enabled_property() -> &'static DirectProperty<ScrollGestureRecognizer, bool>
```

Defines the `IsScrollInertiaEnabled` property.

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

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

### scroll_start_distance_property

```rust
fn scroll_start_distance_property() -> &'static DirectProperty<ScrollGestureRecognizer, i32>
```

Defines the `ScrollStartDistance` property.

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

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

### offset_property

```rust
fn offset_property() -> &'static DirectProperty<ScrollGestureRecognizer, Option<Vector>>
```

Defines the `Offset` property.

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

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

### extent_property

```rust
fn extent_property() -> &'static DirectProperty<ScrollGestureRecognizer, Option<Size>>
```

Defines the `Extent` property.

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

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

### viewport_property

```rust
fn viewport_property() -> &'static DirectProperty<ScrollGestureRecognizer, Option<Size>>
```

Defines the `Viewport` property.

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

<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/scroll_gesture_recognizer.rs#L328)

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

### can_horizontally_scroll

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

Whether the content can be scrolled horizontally.

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

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

### set_can_horizontally_scroll

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



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

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

### can_vertically_scroll

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

Whether the content can be scrolled vertically.

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

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

### set_can_vertically_scroll

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



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

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

### is_scroll_inertia_enabled

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

Whether scroll inertia is enabled.

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

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

### set_is_scroll_inertia_enabled

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



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

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

### scroll_start_distance

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

The minimum distance the pointer must move before scrolling starts.

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

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

### set_scroll_start_distance

```rust
fn set_scroll_start_distance(self: &Self, value: i32)
```



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

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

### extent

```rust
fn extent(self: &Self) -> Option<Size>
```

The extent of the scrollable content, if known.

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

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

### set_extent

```rust
fn set_extent(self: &Self, value: Option<Size>)
```



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

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

### offset

```rust
fn offset(self: &Self) -> Option<Vector>
```

The current scroll offset, if known.

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

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

### set_offset

```rust
fn set_offset(self: &Self, value: Option<Vector>)
```



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

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

### viewport

```rust
fn viewport(self: &Self) -> Option<Size>
```

The size of the viewport, if known.

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

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

### set_viewport

```rust
fn set_viewport(self: &Self, value: Option<Size>)
```



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

## 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<ScrollGestureRecognizer>`](/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/).
