FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    GenericTextParagraphProperties

    struct · ferroui-base · v0.5.0

    struct GenericTextParagraphProperties
    

    Generic implementation of TextParagraphProperties.

    View source

    Members

    new

    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

    with_options

    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

    with_all

    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

    with_tabs

    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

    set_line_spacing

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

    Set line spacing: the additional space between lines.

    Source

    set_text_line_bounds

    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

    set_line_metrics_mode

    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

    from_properties

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

    Creates a copy of other paragraph properties.

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither
    • TextParagraphProperties

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.