GenericTextParagraphProperties
struct · ferroui-base · v0.5.0
struct GenericTextParagraphProperties
Generic implementation of TextParagraphProperties.
Members
newwith_optionswith_allwith_tabsset_line_spacingset_text_line_boundsset_line_metrics_modefrom_properties
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.
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 propertiestext_alignment— logical horizontal alignmenttext_wrapping— text wrap optionline_height— paragraph line heightletter_spacing— letter spacing
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.
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.
set_line_spacing
fn set_line_spacing(self: &Self, line_spacing: f64)
Set line spacing: the additional space between lines.
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).
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.
from_properties
fn from_properties(text_paragraph_properties: &dyn TextParagraphProperties) -> Self
Creates a copy of other paragraph properties.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>AnyErasedDestructorIntoEitherTextParagraphProperties
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.