# FocusChangedEventArgs

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/input/struct-focuschangedeventargs/

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

```rust
struct FocusChangedEventArgs
```

Holds arguments for the `GotFocus` and `LostFocus` events.

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

## Members

- [`new_focused_element`](#struct_field-new_focused_element)
- [`old_focused_element`](#struct_field-old_focused_element)
- [`navigation_method`](#struct_field-navigation_method)
- [`key_modifiers`](#struct_field-key_modifiers)
- [`new`](#function-new)

<a id="struct_field-new_focused_element"></a>

### new_focused_element

```rust
new_focused_element: Option<crate::Ref<super::InputElement>>
```

The element that focus has moved to.

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

<a id="struct_field-old_focused_element"></a>

### old_focused_element

```rust
old_focused_element: Option<crate::Ref<super::InputElement>>
```

The element that previously had focus.

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

<a id="struct_field-navigation_method"></a>

### navigation_method

```rust
navigation_method: super::NavigationMethod
```

Indicates how the change in focus occurred.

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

<a id="struct_field-key_modifiers"></a>

### key_modifiers

```rust
key_modifiers: super::KeyModifiers
```

Any key modifiers active at the time of focus.

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

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

### new

```rust
fn new<T: ?Sized>(routed_event: &RoutedEvent<T>) -> Self
```

Creates args for a routed event.

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

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- [`Receiver`](/docs/0.5.0/api/ferroui-system/task/oneshot/struct-receiver/)
- `Any`
- `ToOwned`
- `ErasedDestructor`
- `IntoEither`
- `Clone`
- `Deref`
- [`IRoutedEventArgs`](/docs/0.5.0/api/ferroui-base/interactivity/trait-iroutedeventargs/)
- [`IKeyModifiersEventArgs`](/docs/0.5.0/api/ferroui-base/input/trait-ikeymodifierseventargs/)
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)

## Availability

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