FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    ParagraphFormat

    struct · ferroui-controls · v0.5.0

    struct ParagraphFormat
    

    Paragraph formatting and inherited character defaults, represented as a patch.

    View source

    Members

    character

    character: CharacterFormat
    

    Source

    text_alignment

    text_alignment: Option<ferroui_base::media::TextAlignment>
    

    Source

    line_height

    line_height: Option<f64>
    

    Source

    line_stacking_strategy

    line_stacking_strategy: Option<super::LineStackingStrategy>
    

    Source

    text_indent

    text_indent: Option<f64>
    

    Source

    margin

    margin: Option<ferroui_base::Thickness>
    

    Source

    flow_direction

    flow_direction: Option<ferroui_base::media::FlowDirection>
    

    Source

    line_spacing_rule

    line_spacing_rule: Option<super::LineSpacingRule>
    

    Source

    line_spacing

    line_spacing: Option<f64>
    

    Source

    left_indent

    left_indent: Option<f64>
    

    Source

    right_indent

    right_indent: Option<f64>
    

    Source

    tab_stops

    tab_stops: Option<super::TextTabStops>
    

    Source

    default_tab_stop

    default_tab_stop: Option<f64>
    

    Source

    from_paragraph

    fn from_paragraph(paragraph: &Paragraph) -> Self
    

    Source

    effective

    fn effective(paragraph: &Paragraph) -> Self
    

    Captures resolved paragraph and inherited character values for format queries.

    Source

    add_tab

    fn add_tab(self: &mut Self, position: f64, alignment: TabAlignment, leader: TabLeader) -> Result<(), super::DocumentError>
    

    Adds or replaces an explicit tab. TOM positions are points; paragraph properties, snapshots and the formatter retain layout units (96 per inch).

    Source

    clear_all_tabs

    fn clear_all_tabs(self: &mut Self)
    

    Removes explicit tabs; default equally spaced stops remain active.

    Source

    delete_tab

    fn delete_tab(self: &mut Self, position: f64) -> Result<(), super::DocumentError>
    

    Source

    tab_count

    fn tab_count(self: &Self) -> usize
    

    Source

    get_tab

    fn get_tab(self: &Self, index: usize) -> Result<(f64, TabAlignment, TabLeader), super::DocumentError>
    

    Zero-based explicit tab query; positions are returned in TOM points.

    Source

    set_indents

    fn set_indents(self: &mut Self, first: f64, left: f64, right: f64) -> Result<(), super::DocumentError>
    

    Sets TOM indentation in points. Negative values are valid; paragraph margins remain nonnegative layout spacing and are stored separately.

    Source

    get_indents

    fn get_indents(self: &Self) -> (f64, f64, f64)
    

    Returns first-line, left, and right indentation in TOM points.

    Source

    set_line_spacing

    fn set_line_spacing(self: &mut Self, rule: LineSpacingRule, spacing: f64) -> Result<(), super::DocumentError>
    

    Sets the TOM line spacing in points, converting absolute distances to layout units. Multipliers and percentages retain their native units.

    Source

    get_line_spacing

    fn get_line_spacing(self: &Self) -> (LineSpacingRule, f64)
    

    Returns the TOM rule and value; absolute distances are returned in points.

    Source

    validate

    fn validate(self: &Self) -> Result<(), super::DocumentError>
    

    Source

    overlay

    fn overlay(self: &Self, patch: &Self) -> Self
    

    Source

    try_apply_to

    fn try_apply_to(self: &Self, paragraph: &Paragraph) -> Result<(), super::DocumentError>
    

    Source

    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
    • AnyValue
    • ClassDefaults
    • ErasedDestructor
    • IntoEither
    • Clone
    • Debug
    • Default
    • PartialEq

    Availability

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