# SizeChangedEventArgs

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

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

```rust
struct SizeChangedEventArgs
```

Provides data specific to a `SizeChanged` event.

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

## Members

- [`with_event`](#function-with_event)
- [`with_event_and_source`](#function-with_event_and_source)
- [`new`](#function-new)
- [`height_changed`](#function-height_changed)
- [`new_size`](#function-new_size)
- [`previous_size`](#function-previous_size)
- [`width_changed`](#function-width_changed)

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

### with_event

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

Creates args for a routed event.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/size_changed_event_args.rs#L18)

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

### with_event_and_source

```rust
fn with_event_and_source<T: ?Sized>(routed_event: &RoutedEvent<T>, source: impl Into<Nullable<FerroObject>>) -> Self
```

Creates args for a routed event with a source.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/size_changed_event_args.rs#L23)

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

### new

```rust
fn new<T: ?Sized>(routed_event: &RoutedEvent<T>, source: impl Into<Nullable<FerroObject>>, previous_size: Size, new_size: Size) -> Self
```

Creates args for a routed event with a source and the previous and
new sizes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/size_changed_event_args.rs#L32)

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

### height_changed

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

Whether the height of the new size is considered different to the
previous size height.

This will take into account layout epsilon and will not be true if
both heights are considered equivalent for layout purposes. Remember
there can be small variations in the calculations between layout
cycles due to rounding and precision even when the size has not
otherwise changed.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/size_changed_event_args.rs#L49)

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

### new_size

```rust
fn new_size(self: &Self) -> Size
```

The new size (or bounds) of the object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/size_changed_event_args.rs#L54)

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

### previous_size

```rust
fn previous_size(self: &Self) -> Size
```

The previous size (or bounds) of the object.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/size_changed_event_args.rs#L59)

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

### width_changed

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

Whether the width of the new size is considered different to the
previous size width.

See `height_changed`.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Controls/size_changed_event_args.rs#L67)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `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`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- [`MarkupTyped`](/docs/0.5.0/api/ferroui-base/metadata/trait-markuptyped/)
- `Clone`
- `Default`
- `Deref`
- [`IRoutedEventArgs`](/docs/0.5.0/api/ferroui-base/interactivity/trait-iroutedeventargs/)

## Availability

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