# AnimatorKeyFrame

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/animation/struct-animatorkeyframe/

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

```rust
struct AnimatorKeyFrame
```

Defines a key frame that is used for an animator.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L18)

## Members

- [`TYPE`](#assoc_const-type)
- [`to_ref`](#function-to_ref)
- [`value_property`](#function-value_property)
- [`new`](#function-new)
- [`animator_type`](#function-animator_type)
- [`animator_factory`](#function-animator_factory)
- [`cue`](#function-cue)
- [`key_spline`](#function-key_spline)
- [`fill_before`](#function-fill_before)
- [`set_fill_before`](#function-set_fill_before)
- [`fill_after`](#function-fill_after)
- [`set_fill_after`](#function-set_fill_after)
- [`property`](#function-property)
- [`value`](#function-value)
- [`set_value`](#function-set_value)
- [`bind_setter`](#function-bind_setter)
- [`get_typed_value`](#function-get_typed_value)

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

### TYPE

```rust
const TYPE: &'static $crate::TypeInfo
```

The runtime type of this class.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L30)

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

### to_ref

```rust
fn to_ref(self: &Self) -> $crate::Ref<AnimatorKeyFrame>
```

Returns a strong reference to this object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L30)

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

### value_property

```rust
fn value_property() -> &'static DirectProperty<AnimatorKeyFrame, Option<BoxedValue>>
```

Defines the `Value` property.

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

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

### new

```rust
fn new(animator_type: Option<TypeId>, animator_factory: Option<AnimatorFactory>, cue: Cue, key_spline: Option<Ref<KeySpline>>) -> Ref<Self>
```

Creates a key frame for the animator type `animator_type`, which
`animator_factory` creates.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L50)

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

### animator_type

```rust
fn animator_type(self: &Self) -> Option<TypeId>
```

The type of the animator the key frame belongs to.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L70)

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

### animator_factory

```rust
fn animator_factory(self: &Self) -> Option<AnimatorFactory>
```

The factory of the animator the key frame belongs to.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L75)

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

### cue

```rust
fn cue(self: &Self) -> Cue
```

The position of the key frame within an iteration.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L81)

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

### key_spline

```rust
fn key_spline(self: &Self) -> Option<&Ref<KeySpline>>
```

The spline applied to the progress towards this key frame.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L87)

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

### fill_before

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

Whether the value of this key frame applies before its cue.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L93)

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

### set_fill_before

```rust
fn set_fill_before(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L97)

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

### fill_after

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

Whether the value of this key frame applies after its cue.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L103)

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

### set_fill_after

```rust
fn set_fill_after(self: &Self, value: bool)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L107)

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

### property

```rust
fn property(self: &Self) -> Option<&'static FerroProperty>
```

The property the key frame animates.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L112)

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

### value

```rust
fn value(self: &Self) -> Option<BoxedValue>
```

The value of the key frame: a value of exactly the animated
property's value type, or `None`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L118)

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

### set_value

```rust
fn set_value(self: &Self, value: Option<BoxedValue>)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L122)

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

### bind_setter

```rust
fn bind_setter(self: &Self, setter: &dyn IAnimationSetter, target_control: &Animatable) -> Rc<dyn IDisposable>
```

Takes the property and the value from `setter`. When the setter's
value is a source of values, the key frame's value follows it for as
long as the returned handle is not disposed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L136)

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

### get_typed_value

```rust
fn get_typed_value<T: PropertyValue>(self: &Self) -> T
```

The value of the key frame as a `T`. Panics when the key frame has no
value or the value is of another type.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/animation/animator_key_frame.rs#L163)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`FerroObjectImplExt`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimplext/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ToString`
- `ErasedDestructor`
- `IntoEither`
- `Deref`
- [`Upcast<T>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`Upcast<AnimatorKeyFrame>`](/docs/0.5.0/api/ferroui-base/trait-upcast/)
- [`StaticType`](/docs/0.5.0/api/ferroui-base/trait-statictype/)
- [`ObjectType`](/docs/0.5.0/api/ferroui-base/trait-objecttype/)
- [`Subclassable<T>`](/docs/0.5.0/api/ferroui-base/trait-subclassable/)
- [`FerroObjectImpl`](/docs/0.5.0/api/ferroui-base/trait-ferroobjectimpl/)
- `Display`

## Availability

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