TextParagraphProperties
trait · ferroui-base · v0.5.0
trait TextParagraphProperties: 'static
Provides a set of properties that are used during the paragraph layout.
Members
flow_directiontext_alignmentline_heightline_spacingtext_line_boundsline_metrics_modefirst_line_in_paragraphalways_collapsibledefault_text_run_propertiestext_decorationstext_wrappingindentparagraph_indentdefault_incremental_tabtab_stopstab_originletter_spacing
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.
text_alignment
fn text_alignment(self: &Self) -> TextAlignment
Gets the text alignment.
line_height
fn line_height(self: &Self) -> f64
Paragraph's line height.
line_spacing
fn line_spacing(self: &Self) -> f64
Paragraph's line spacing.
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.
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.
first_line_in_paragraph
fn first_line_in_paragraph(self: &Self) -> bool
Indicates the first line of the paragraph.
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.
default_text_run_properties
fn default_text_run_properties(self: &Self) -> &Rc<dyn TextRunProperties>
Gets the default text style.
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.
text_wrapping
fn text_wrapping(self: &Self) -> TextWrapping
Gets the text wrapping.
indent
fn indent(self: &Self) -> f64
Line indentation.
paragraph_indent
fn paragraph_indent(self: &Self) -> f64
Get the paragraph indentation.
default_incremental_tab
fn default_incremental_tab(self: &Self) -> f64
Gets the default incremental tab width.
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.
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.
letter_spacing
fn letter_spacing(self: &Self) -> f64
Gets the letter spacing.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.