# IEffectInputHandler

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/effects/trait-ieffectinputhandler/

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

```rust
trait IEffectInputHandler
```

The pointer input of an interactive effect (Effector's `ISkiaInputEffectHandler`): implemented by
an effect class constructed with
`Effect::construct_interactive`.

Every member has an empty default, as the members of Effector's `SkiaInteractiveEffectBase`
have, so an effect implements what it uses.
## Routing

The host routes its pointer events to the effect from handlers it adds to the direct and the
bubble routes of each event (`Interactive::DEFAULT_ROUTES`), so that the effect sees what happens
over the host and over its descendants:

- after the handlers of the tunnel route, the class handlers of the host (its own `on_pointer_*`
  members) and the handlers the descendants of the host have on the bubble route, and before the
  ancestors of the host see the event on the bubble route; among the handlers of the host itself,
  in the order they were added;
- an event that is already handled is not delivered, unless the effect asks for handled events
  (`handled_events_too`): the effect of a button, whose own handler
  handles the press, asks for them;
- a pointer the host or the effect captured is routed to the host wherever it is, so the effect
  sees its moves and its release outside the bounds of the host; when the capture of the host or
  of one of its descendants is lost (the release of an implicit capture, or another element
  capturing the pointer), the effect receives
  `on_pointer_capture_lost`.

The handlers of the effect may change the effect of the host: the effect then is detached
(`on_detached`) and receives nothing more from it.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/effect_input.rs#L57)

## Members

- [`handled_events_too`](#function-handled_events_too)
- [`on_attached`](#function-on_attached)
- [`on_detached`](#function-on_detached)
- [`on_host_bounds_changed`](#function-on_host_bounds_changed)
- [`on_pointer_entered`](#function-on_pointer_entered)
- [`on_pointer_exited`](#function-on_pointer_exited)
- [`on_pointer_moved`](#function-on_pointer_moved)
- [`on_pointer_pressed`](#function-on_pointer_pressed)
- [`on_pointer_released`](#function-on_pointer_released)
- [`on_pointer_capture_lost`](#function-on_pointer_capture_lost)
- [`on_pointer_wheel_changed`](#function-on_pointer_wheel_changed)

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

### handled_events_too

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

Whether the effect receives events that are already handled (default `false`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/effect_input.rs#L59)

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

### on_attached

```rust
fn on_attached(self: &Self, _context: &EffectHostContext<'_>)
```

The effect was attached to the host: it became the host's effect.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/effect_input.rs#L64)

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

### on_detached

```rust
fn on_detached(self: &Self, _context: &EffectHostContext<'_>)
```

The effect was detached from the host: the host's effect was replaced or cleared.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/effect_input.rs#L67)

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

### on_host_bounds_changed

```rust
fn on_host_bounds_changed(self: &Self, _context: &EffectHostContext<'_>)
```

The bounds, the render transform or the origin of the render transform of the host
changed; also called once after `on_attached`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/effect_input.rs#L71)

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

### on_pointer_entered

```rust
fn on_pointer_entered(self: &Self, _context: &EffectHostContext<'_>, _e: &PointerEventArgs)
```

The pointer entered the host.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/effect_input.rs#L74)

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

### on_pointer_exited

```rust
fn on_pointer_exited(self: &Self, _context: &EffectHostContext<'_>, _e: &PointerEventArgs)
```

The pointer left the host.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/effect_input.rs#L77)

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

### on_pointer_moved

```rust
fn on_pointer_moved(self: &Self, _context: &EffectHostContext<'_>, _e: &PointerEventArgs)
```

The pointer moved over the host, or anywhere while the host captures it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/effect_input.rs#L80)

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

### on_pointer_pressed

```rust
fn on_pointer_pressed(self: &Self, _context: &EffectHostContext<'_>, _e: &PointerPressedEventArgs)
```

The pointer was pressed over the host.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/effect_input.rs#L83)

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

### on_pointer_released

```rust
fn on_pointer_released(self: &Self, _context: &EffectHostContext<'_>, _e: &PointerReleasedEventArgs)
```

The pointer was released over the host, or anywhere while the host captures it.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/effect_input.rs#L86)

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

### on_pointer_capture_lost

```rust
fn on_pointer_capture_lost(self: &Self, _context: &EffectHostContext<'_>, _e: &PointerCaptureLostEventArgs)
```

The host or one of its descendants lost the capture of the pointer.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/effect_input.rs#L89)

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

### on_pointer_wheel_changed

```rust
fn on_pointer_wheel_changed(self: &Self, _context: &EffectHostContext<'_>, _e: &PointerWheelEventArgs)
```

The wheel was turned over the host.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/effects/effect_input.rs#L92)

## Trait implementations

- [`IEffectInputHandler`](/docs/0.5.0/api/ferroui-base/media/effects/trait-ieffectinputhandler/)

## Availability

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