FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    TextParagraphProperties

    trait · ferroui-base · v0.5.0

    trait TextParagraphProperties: 'static
    

    Provides a set of properties that are used during the paragraph layout.

    View source

    Members

    flow_direction

    fn flow_direction(self: &Self) -> FlowDirection
    

    This property specifies whether the primary text advance direction shall be left-to-right, right-to-left.

    Source

    text_alignment

    fn text_alignment(self: &Self) -> TextAlignment
    

    Gets the text alignment.

    Source

    line_height

    fn line_height(self: &Self) -> f64
    

    Paragraph's line height.

    Source

    line_spacing

    fn line_spacing(self: &Self) -> f64
    

    Paragraph's line spacing.

    Source

    text_line_bounds

    fn text_line_bounds(self: &Self) -> TextLineBounds
    

    How the box of each line is bounded above and below (a FerroUI addition, docs/porting/DEVIATIONS.md, Text block): by the ascent and the descent of the font, or trimmed to its cap height and to the baseline.

    Source

    line_metrics_mode

    fn line_metrics_mode(self: &Self) -> TextLineMetricsMode
    

    Chooses the font metrics used to allocate line boxes. Custom paragraph implementations retain the existing glyph-typeface behavior by default.

    Source

    first_line_in_paragraph

    fn first_line_in_paragraph(self: &Self) -> bool
    

    Indicates the first line of the paragraph.

    Source

    always_collapsible

    fn always_collapsible(self: &Self) -> bool
    

    If true, the formatted line may always be collapsed. If false, only lines that overflow the paragraph width are collapsed.

    Source

    default_text_run_properties

    fn default_text_run_properties(self: &Self) -> &Rc<dyn TextRunProperties>
    

    Gets the default text style.

    Source

    text_decorations

    fn text_decorations(self: &Self) -> Option<&TextDecorationCollection>
    

    If not null, text decorations to apply to all runs in the line. This is in addition to any text decorations specified by the text run properties for individual text runs.

    Source

    text_wrapping

    fn text_wrapping(self: &Self) -> TextWrapping
    

    Gets the text wrapping.

    Source

    indent

    fn indent(self: &Self) -> f64
    

    Line indentation.

    Source

    paragraph_indent

    fn paragraph_indent(self: &Self) -> f64
    

    Get the paragraph indentation.

    Source

    default_incremental_tab

    fn default_incremental_tab(self: &Self) -> f64
    

    Gets the default incremental tab width.

    Source

    tab_stops

    fn tab_stops(self: &Self) -> Option<&[TextTabStop]>
    

    Explicit paragraph tab stops. Some(&[]) enables position-based default stops; None retains the existing fixed-width shaping convention for callers that have not opted into paragraph tab layout.

    Source

    tab_origin

    fn tab_origin(self: &Self) -> f64
    

    The current line's leading edge relative to the tab-stop origin, including paragraph and first-line indentation. Units follow default_incremental_tab.

    Source

    letter_spacing

    fn letter_spacing(self: &Self) -> f64
    

    Gets the letter spacing.

    Source

    Trait implementations

    Availability

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