# TextPathSegmentEllipsis

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/media/struct-textpathsegmentellipsis/

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

```rust
struct TextPathSegmentEllipsis
```

Provides text collapsing properties that replace the middle segments of a file path with an ellipsis symbol when
the rendered width exceeds a specified limit.

This class is typically used to display file paths in a compact form by collapsing segments near
the center and inserting an ellipsis, ensuring that the most relevant parts of the path remain visible. It is
suitable for scenarios where space is limited, such as UI elements that display file or directory paths. The
collapsing behavior prioritizes preserving the beginning and end segments of the path.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/text_path_segment_ellipsis.rs#L17)

## Members

- [`new`](#function-new)

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

### new

```rust
fn new(ellipsis: &str, width: f64, text_run_properties: Rc<dyn TextRunProperties>, flow_direction: FlowDirection) -> Self
```

Initializes a new instance with the specified ellipsis symbol, maximum
width, text run properties, and flow direction.

* `ellipsis` — the string to use as the ellipsis symbol when collapsing path segments.
* `width` — the maximum width, in device-independent pixels, within which the text must fit.
* `text_run_properties` — the text formatting properties to apply to the ellipsis symbol.
* `flow_direction` — the flow direction for text layout.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/media/text_path_segment_ellipsis.rs#L40)

## Trait implementations

- `Send`
- `Sync`
- `Freeze`
- `UnsafeUnpin`
- `Unpin`
- `UnwindSafe`
- `RefUnwindSafe`
- [`ClassDefaults`](/docs/0.5.0/api/ferroui-base/trait-classdefaults/)
- `Borrow<T>`
- `BorrowMut<T>`
- `Into<U>`
- `From<T>`
- `TryInto<U>`
- `TryFrom<U>`
- `Any`
- `ErasedDestructor`
- `IntoEither`
- [`TextCollapsingProperties`](/docs/0.5.0/api/ferroui-base/media/text_formatting/trait-textcollapsingproperties/)

## Availability

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