# Thumb

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

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

```rust
struct Thumb
```

A control that can be dragged by the user.

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

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`on_drag_started`](#function-on_drag_started)
- [`on_drag_delta`](#function-on_drag_delta)
- [`on_drag_completed`](#function-on_drag_completed)
- [`PSEUDO_CLASSES`](#assoc_const-pseudo_classes)
- [`drag_started_event`](#function-drag_started_event)
- [`drag_delta_event`](#function-drag_delta_event)
- [`drag_completed_event`](#function-drag_completed_event)
- [`construct`](#function-construct)
- [`new`](#function-new)
- [`drag_started`](#function-drag_started)
- [`drag_delta`](#function-drag_delta)
- [`drag_completed`](#function-drag_completed)

<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/primitives/thumb.rs#L25)

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

### to_ref

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

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/thumb.rs#L25)

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

### on_drag_started

```rust
fn on_drag_started(self: &Self, e: &VectorEventArgs)
```

Invoked when an unhandled `DragStarted` event reaches an element
in its route that is derived from this class. Implement this
method to add class handling for this event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/thumb.rs#L25)

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

### on_drag_delta

```rust
fn on_drag_delta(self: &Self, e: &VectorEventArgs)
```

Invoked when an unhandled `DragDelta` event reaches an element in
its route that is derived from this class. Implement this method
to add class handling for this event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/thumb.rs#L25)

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

### on_drag_completed

```rust
fn on_drag_completed(self: &Self, e: &VectorEventArgs)
```

Invoked when an unhandled `DragCompleted` event reaches an element
in its route that is derived from this class. Implement this
method to add class handling for this event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/thumb.rs#L25)

<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/primitives/thumb.rs#L122)

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

### drag_started_event

```rust
fn drag_started_event() -> &'static RoutedEvent<VectorEventArgs>
```

Defines the `DragStarted` routed event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/thumb.rs#L124)

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

### drag_delta_event

```rust
fn drag_delta_event() -> &'static RoutedEvent<VectorEventArgs>
```

Defines the `DragDelta` routed event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/thumb.rs#L131)

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

### drag_completed_event

```rust
fn drag_completed_event() -> &'static RoutedEvent<VectorEventArgs>
```

Defines the `DragCompleted` routed event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/thumb.rs#L138)

<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/primitives/thumb.rs#L164)

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

### new

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/thumb.rs#L168)

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

### drag_started

```rust
fn drag_started(self: &Self, handler: impl Fn(&Interactive, &VectorEventArgs) -> () + 'static) -> RoutedEventHandlerToken
```

Raised when a drag of the thumb starts.

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

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

### drag_delta

```rust
fn drag_delta(self: &Self, handler: impl Fn(&Interactive, &VectorEventArgs) -> () + 'static) -> RoutedEventHandlerToken
```

Raised while the thumb is dragged.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/thumb.rs#L178)

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

### drag_completed

```rust
fn drag_completed(self: &Self, handler: impl Fn(&Interactive, &VectorEventArgs) -> () + 'static) -> RoutedEventHandlerToken
```

Raised when a drag of the thumb completes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/primitives/thumb.rs#L183)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`TemplatedControlImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimplext/)
- [`ThumbImplExt`](/docs/0.5.0/api/ferroui-controls/primitives/trait-thumbimplext/)
- [`ControlImplExt`](/docs/0.5.0/api/ferroui-controls/trait-controlimplext/)
- `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<Thumb>`](/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/)
- [`TemplatedControlImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-templatedcontrolimpl/)
- [`ControlImpl`](/docs/0.5.0/api/ferroui-controls/trait-controlimpl/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- [`InputElementImpl`](/docs/0.5.0/api/ferroui-base/input/trait-inputelementimpl/)
- [`ThumbImpl`](/docs/0.5.0/api/ferroui-controls/primitives/trait-thumbimpl/)

## Availability

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