# FerroActivationForViewFetcher

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

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

```rust
struct FerroActivationForViewFetcher
```

The activation of the views of FerroUI (`FerroActivationForViewFetcher`).

A view whose object is a `Visual` has an affinity; its activation follows the `Loaded` and
`Unloaded` events of a `Control`, or the attachment to and the detachment from the visual tree
of any other visual. Each observable emits only when the state changes.

The object of a view is the control behind a view adapter of the crate, or, for another type of
view, the object `FerroObjectHandles::object_of` finds: such a view registers its type there
(`FerroObjectHandles::register` or `FerroObjectHandles::register_class`).

Deviation (DEVIATIONS.md, ReactiveUI controls): the affinity is computed on the view, as every
fetcher of the port does. The activation of a `Window` also follows its visibility: hiding the
window deactivates it and showing it again activates it, as the views of a hidden window are not
shown.

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

## Members

- [`VISUAL_AFFINITY`](#assoc_const-visual_affinity)
- [`new`](#function-new)

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

### VISUAL_AFFINITY

```rust
const VISUAL_AFFINITY: i32
```

The affinity of the views that are visuals (`FerroVisualAffinity`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/ferro_activation_for_view_fetcher.rs#L33)

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

### new

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

The fetcher (`new FerroActivationForViewFetcher()`).

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.ReactiveUI.Controls/ferro_activation_for_view_fetcher.rs#L36)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `Debug`
- `Default`
- `Clone`
- `Copy`
- [`IActivationForViewFetcher`](/docs/0.5.0/api/ferroui-reactiveui/activation/trait-iactivationforviewfetcher/)

## Availability

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