# SpinEventArgs

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-controls/struct-spineventargs/

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

```rust
struct SpinEventArgs
```

Provides data for the spinner's `Spin` event.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/spinner.rs#L44)

## Members

- [`new`](#function-new)
- [`with_event`](#function-with_event)
- [`with_mouse_wheel`](#function-with_mouse_wheel)
- [`with_event_and_mouse_wheel`](#function-with_event_and_mouse_wheel)
- [`direction`](#function-direction)
- [`using_mouse_wheel`](#function-using_mouse_wheel)

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

### new

```rust
fn new(direction: SpinDirection) -> Self
```

Creates args for a spin in the given direction, with no routed event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/spinner.rs#L54)

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

### with_event

```rust
fn with_event<T: ?Sized>(routed_event: Option<&RoutedEvent<T>>, direction: SpinDirection) -> Self
```

Creates args for a routed event and a spin in the given direction.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/spinner.rs#L59)

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

### with_mouse_wheel

```rust
fn with_mouse_wheel(direction: SpinDirection, using_mouse_wheel: bool) -> Self
```

Creates args for a spin in the given direction, with no routed
event, stating whether the spin was initiated by a mouse wheel.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/spinner.rs#L65)

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

### with_event_and_mouse_wheel

```rust
fn with_event_and_mouse_wheel<T: ?Sized>(routed_event: Option<&RoutedEvent<T>>, direction: SpinDirection, using_mouse_wheel: bool) -> Self
```

Creates args for a routed event and a spin in the given direction,
stating whether the spin was initiated by a mouse wheel.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/spinner.rs#L71)

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

### direction

```rust
fn direction(self: &Self) -> SpinDirection
```

The direction for the spin.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/spinner.rs#L83)

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

### using_mouse_wheel

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

Whether the spin event originated from a mouse wheel event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/spinner.rs#L89)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `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`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)
- `Clone`
- `Deref`
- [`IRoutedEventArgs`](/docs/0.5.0/api/ferroui-base/interactivity/trait-iroutedeventargs/)

## Availability

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