# GenericTextParagraphProperties

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

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

```rust
struct GenericTextParagraphProperties
```

Generic implementation of `TextParagraphProperties`.

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

## Members

- [`new`](#function-new)
- [`with_options`](#function-with_options)
- [`with_all`](#function-with_all)
- [`with_tabs`](#function-with_tabs)
- [`set_line_spacing`](#function-set_line_spacing)
- [`set_text_line_bounds`](#function-set_text_line_bounds)
- [`set_line_metrics_mode`](#function-set_line_metrics_mode)
- [`from_properties`](#function-from_properties)

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

### new

```rust
fn new(default_text_run_properties: Rc<dyn TextRunProperties>) -> Self
```

Creates left aligned, non wrapping paragraph properties with automatic
line height and no letter spacing.

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

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

### with_options

```rust
fn with_options(default_text_run_properties: Rc<dyn TextRunProperties>, text_alignment: TextAlignment, text_wrapping: TextWrapping, line_height: f64, letter_spacing: f64) -> Self
```

Creates paragraph properties.

* `default_text_run_properties` — default paragraph's default run properties
* `text_alignment` — logical horizontal alignment
* `text_wrapping` — text wrap option
* `line_height` — paragraph line height
* `letter_spacing` — letter spacing

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

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

### with_all

```rust
fn with_all(flow_direction: FlowDirection, text_alignment: TextAlignment, first_line_in_paragraph: bool, always_collapsible: bool, default_text_run_properties: Rc<dyn TextRunProperties>, text_wrapping: TextWrapping, line_height: f64, indent: f64, letter_spacing: f64) -> Self
```

Creates paragraph properties with every value specified.

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

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

### with_tabs

```rust
fn with_tabs(self: Self, tabs: TextTabStops, default_tab: f64, origin: f64) -> Self
```

Enables paragraph tab-stop layout while retaining the existing run shaper.

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

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

### set_line_spacing

```rust
fn set_line_spacing(self: &Self, line_spacing: f64)
```

Set line spacing: the additional space between lines.

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

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

### set_text_line_bounds

```rust
fn set_text_line_bounds(self: &Self, text_line_bounds: TextLineBounds)
```

Sets how the box of each line is bounded (a FerroUI addition, docs/porting/DEVIATIONS.md,
Text block).

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

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

### set_line_metrics_mode

```rust
fn set_line_metrics_mode(self: &Self, mode: TextLineMetricsMode)
```

Selects which font metrics allocate the line box. The glyph-typeface
mode remains the default; family mode preserves metrics across glyph
fallback and retains full embedded-object contributions.

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

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

### from_properties

```rust
fn from_properties(text_paragraph_properties: &dyn TextParagraphProperties) -> Self
```

Creates a copy of other paragraph properties.

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

## 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`
- [`TextParagraphProperties`](/docs/0.5.0/api/ferroui-base/media/text_formatting/trait-textparagraphproperties/)

## Availability

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