# ICompositionCustomVisualHandler

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/rendering/composition/trait-icompositioncustomvisualhandler/

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

```rust
trait ICompositionCustomVisualHandler: 'static
```

The overridable members of a custom visual handler. A handler class
embeds a [`CompositionCustomVisualHandler`](/docs/0.5.0/api/ferroui-base/rendering/composition/struct-compositioncustomvisualhandler/) and implements this trait.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_custom_visual_handler.rs#L26)

## Members

- [`handler_base`](#function-handler_base)
- [`on_message`](#function-on_message)
- [`on_animation_frame_update`](#function-on_animation_frame_update)
- [`on_render`](#function-on_render)
- [`get_render_bounds`](#function-get_render_bounds)

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

### handler_base

```rust
fn handler_base(self: &Self) -> &CompositionCustomVisualHandler
```

The embedded handler state.

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

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

### on_message

```rust
fn on_message(self: &Self, _message: std::sync::Arc<dyn Any + Send + Sync>)
```

A message sent with `CompositionCustomVisual::send_handler_message`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_custom_visual_handler.rs#L31)

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

### on_animation_frame_update

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_custom_visual_handler.rs#L33)

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

### on_render

```rust
fn on_render(self: &Self, drawing_context: &mut ImmediateDrawingContext<'_>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_custom_visual_handler.rs#L35)

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

### get_render_bounds

```rust
fn get_render_bounds(self: &Self) -> Rect
```

The bounds of what the handler draws; the effective size of the
visual by default.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/rendering/composition/composition_custom_visual_handler.rs#L39)

## Availability

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