# IPointer

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/input/trait-ipointer/

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

```rust
trait IPointer
```

Identifies a specific input pointer, e.g. a mouse, a touch contact or a
pen.

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

## Members

- [`id`](#function-id)
- [`capture`](#function-capture)
- [`captured`](#function-captured)
- [`type_`](#function-type_)
- [`is_primary`](#function-is_primary)
- [`as_any`](#function-as_any)

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

### id

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

The unique identifier of the pointer.

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

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

### capture

```rust
fn capture(self: &Self, control: Option<&Ref<InputElement>>)
```

Captures pointer input to the specified control.

When an element captures the pointer, it receives pointer input
whether the cursor is within the control's bounds or not. The current
pointer capture control is exposed by `captured`.

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

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

### captured

```rust
fn captured(self: &Self) -> Option<Ref<InputElement>>
```

The control that is currently capturing the pointer, if any.

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

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

### type_

```rust
fn type_(self: &Self) -> PointerType
```

The type of the pointer.

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

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

### is_primary

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

Whether the pointer is the primary pointer of its type.

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

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

### as_any

```rust
fn as_any(self: &Self) -> &dyn Any
```

The pointer as `Any`, for downcasting to the concrete pointer.

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

## Trait implementations

- [`IPointer`](/docs/0.5.0/api/ferroui-base/input/trait-ipointer/)

## Availability

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