# MaterialAppBarState

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-themes-material/struct-materialappbarstate/

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

```rust
struct MaterialAppBarState
```

A serializable scroll snapshot. Deltas follow finger movement: up is negative.
The offset is always between the negative collapse limit and zero.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L81)

## Members

- [`new`](#function-new)
- [`height_offset_limit`](#function-height_offset_limit)
- [`height_offset`](#function-height_offset)
- [`content_offset`](#function-content_offset)
- [`content_at_start`](#function-content_at_start)
- [`set_height_offset_limit`](#function-set_height_offset_limit)
- [`set_height_offset`](#function-set_height_offset)
- [`set_content_offset`](#function-set_content_offset)
- [`set_content_at_start`](#function-set_content_at_start)
- [`collapsed_fraction`](#function-collapsed_fraction)
- [`overlapped_fraction`](#function-overlapped_fraction)
- [`pre_scroll`](#function-pre_scroll)
- [`post_scroll`](#function-post_scroll)
- [`reset_content_after_fling`](#function-reset_content_after_fling)
- [`snap_target`](#function-snap_target)

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

### new

```rust
fn new(height_offset_limit: f64) -> Self
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L95)

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

### height_offset_limit

```rust
fn height_offset_limit(self: Self) -> f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L105)

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

### height_offset

```rust
fn height_offset(self: Self) -> f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L108)

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

### content_offset

```rust
fn content_offset(self: Self) -> f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L111)

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

### content_at_start

```rust
fn content_at_start(self: Self) -> bool
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L114)

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

### set_height_offset_limit

```rust
fn set_height_offset_limit(self: &mut Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L117)

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

### set_height_offset

```rust
fn set_height_offset(self: &mut Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L123)

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

### set_content_offset

```rust
fn set_content_offset(self: &mut Self, value: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L128)

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

### set_content_at_start

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



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L133)

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

### collapsed_fraction

```rust
fn collapsed_fraction(self: Self) -> f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L136)

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

### overlapped_fraction

```rust
fn overlapped_fraction(self: Self) -> f64
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L143)

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

### pre_scroll

```rust
fn pre_scroll(self: &mut Self, behavior: MaterialAppBarScrollBehavior, available_y: f64) -> f64
```

The source pre-scroll contract consumes the Y gesture when the bar changes height.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L155)

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

### post_scroll

```rust
fn post_scroll(self: &mut Self, behavior: MaterialAppBarScrollBehavior, consumed_y: f64, available_y: f64) -> f64
```

Called after the child. Only exit-until-collapsed responds to leftover downward scroll.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L171)

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

### reset_content_after_fling

```rust
fn reset_content_after_fling(self: &mut Self, available_velocity_y: f64)
```



[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L192)

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

### snap_target

```rust
fn snap_target(self: Self) -> Option<f64>
```

Native rounding tolerance and nearest-anchor threshold, used after decay finishes.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Themes.Material/app_bar_state.rs#L198)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- `Borrow<T>`
- `BorrowMut<T>`
- `CloneToUninit`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ToOwned`
- [`PropertyValue`](/docs/0.5.0/api/ferroui-base/trait-propertyvalue/)
- [`AnyValue`](/docs/0.5.0/api/ferroui-base/trait-anyvalue/)
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `ErasedDestructor`
- `IntoEither`
- `CastableFrom<ST, Uninit, Uninit>`
- `CastableFrom<ST, Initialized, Initialized>`
- `Read<Exclusive, BecauseExclusive>`
- `Clone`
- `Copy`
- `Debug`
- `StructuralPartialEq`
- `PartialEq`
- `Default`

## Availability

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