# ButtonSpinner

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

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

```rust
struct ButtonSpinner
```

Represents a spinner control that includes two buttons.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`on_allow_spin_changed`](#function-on_allow_spin_changed)
- [`TEMPLATE_PARTS`](#assoc_const-template_parts)
- [`PSEUDO_CLASSES`](#assoc_const-pseudo_classes)
- [`allow_spin_property`](#function-allow_spin_property)
- [`show_button_spinner_property`](#function-show_button_spinner_property)
- [`button_spinner_location_property`](#function-button_spinner_location_property)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`allow_spin`](#function-allow_spin)
- [`set_allow_spin`](#function-set_allow_spin)
- [`show_button_spinner`](#function-show_button_spinner)
- [`set_show_button_spinner`](#function-set_show_button_spinner)
- [`button_spinner_location`](#function-button_spinner_location)
- [`set_button_spinner_location`](#function-set_button_spinner_location)

<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.Controls/button_spinner.rs#L42)

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

### to_ref

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

Returns a strong reference to this object.

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

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

### on_allow_spin_changed

```rust
fn on_allow_spin_changed(self: &Self, old_value: bool, new_value: bool)
```

Called when the `AllowSpin` property value changed.

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

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

### TEMPLATE_PARTS

```rust
const TEMPLATE_PARTS: &'static [TemplatePartAttribute]
```

The named parts expected in the control template, in addition to
those of the base class.

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

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

### PSEUDO_CLASSES

```rust
const PSEUDO_CLASSES: PseudoClassesAttribute
```

The pseudoclasses set by the class.

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

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

### allow_spin_property

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

Defines the `AllowSpin` property.

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

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

### show_button_spinner_property

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

Defines the `ShowButtonSpinner` property.

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

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

### button_spinner_location_property

```rust
fn button_spinner_location_property() -> &'static StyledProperty<Location>
```

Defines the `ButtonSpinnerLocation` property.

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

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

### construct

```rust
fn construct() -> Self
```

Creates the class data; see `ferroui_base::FerroObject::construct`.

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

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

### new

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

Creates a button spinner.

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

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

### allow_spin

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

Whether the spinner should allow to spin.

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

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

### set_allow_spin

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



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

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

### show_button_spinner

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

Whether the spin buttons should be shown.

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

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

### set_show_button_spinner

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



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

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

### button_spinner_location

```rust
fn button_spinner_location(self: &Self) -> Location
```

The current location of the spin buttons.

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

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

### set_button_spinner_location

```rust
fn set_button_spinner_location(self: &Self, value: Location)
```



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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TemplatedControlImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimplext/)
- [`ContentControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-contentcontrolimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- [`ButtonSpinnerImplExt`](/docs/0.5.0/api/ferroui-controls/trait-buttonspinnerimplext/)
- [`SpinnerImplExt`](/docs/0.5.0/api/ferroui-controls/trait-spinnerimplext/)
- `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`
- [`InputElementImplExt`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimplext/)
- [`InteractiveImplExt`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimplext/)
- [`LayoutableImplExt`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimplext/)
- [`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/)
- [`VisualImplExt`](/docs/0.5.0/api/ferroui-base/trait-visualimplext/)
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<ButtonSpinner>`](/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/)
- [`StyledElementImpl`](/docs/0.5.0/api/ferroui-base/trait-styledelementimpl/)
- [`VisualImpl`](/docs/0.5.0/api/ferroui-base/trait-visualimpl/)
- [`LayoutableImpl`](/docs/0.5.0/api/ferroui-base/layout/trait-layoutableimpl/)
- [`InteractiveImpl`](/docs/0.5.0/api/ferroui-base/interactivity/trait-interactiveimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`ContentControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-contentcontrolimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)
- [`SpinnerImpl`](/docs/0.5.0/api/ferroui-controls/trait-spinnerimpl/)
- [`ButtonSpinnerImpl`](/docs/0.5.0/api/ferroui-controls/trait-buttonspinnerimpl/)

## Availability

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