# PenDevice

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

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

```rust
struct PenDevice
```

Represents a pen/stylus device.

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

## Members

- [`new`](#function-new)
- [`dispose`](#function-dispose)

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

### new

```rust
fn new(release_pointer_on_pen_up: bool) -> Rc<PenDevice>
```

Creates a pen device. `release_pointer_on_pen_up` tells whether the
pointer is released when the pen is lifted.

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

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

### dispose

```rust
fn dispose(self: &Self)
```

Releases the device and its pointers.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ErasedDestructor`
- `IntoEither`
- [`IInputDevice`](/docs/0.5.0/api/ferroui-base/input/trait-iinputdevice/)
- [`IPointerDevice`](/docs/0.5.0/api/ferroui-base/input/trait-ipointerdevice/)
- [`IPenDevice`](/docs/0.5.0/api/ferroui-base/input/trait-ipendevice/)

## Availability

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