FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    Block

    struct · ferroui-controls · v0.5.0

    struct Block
    

    Base class for block-level text content. A block owns paragraph formatting; character formatting continues to use the inherited TextElement properties.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<Block>
    

    Returns a strong reference to this object.

    Source

    text

    fn text(self: &Self) -> String
    

    Returns the text of this block, without a following paragraph separator.

    Source

    build_text_runs

    fn build_text_runs(self: &Self, text_runs: &mut Vec<Rc<dyn TextRun>>)
    

    Appends formatter runs in content order.

    Source

    measure_embedded_controls

    fn measure_embedded_controls(self: &Self, available_size: Size) -> bool
    

    Measures inline controls and reports whether a size changed.

    Source

    text_alignment_property

    fn text_alignment_property() -> &'static StyledProperty<TextAlignment>
    

    Source

    line_height_property

    fn line_height_property() -> &'static StyledProperty<f64>
    

    Source

    line_stacking_strategy_property

    fn line_stacking_strategy_property() -> &'static StyledProperty<LineStackingStrategy>
    

    Source

    margin_property

    fn margin_property() -> &'static StyledProperty<Thickness>
    

    Source

    flow_direction_property

    fn flow_direction_property() -> &'static StyledProperty<FlowDirection>
    

    Source

    construct

    fn construct() -> Self
    

    Source

    text_length

    fn text_length(self: &Self) -> usize
    

    Length in UTF-16 code units, matching text formatter and document offsets.

    Source

    text_alignment

    fn text_alignment(self: &Self) -> TextAlignment
    

    Source

    set_text_alignment

    fn set_text_alignment(self: &Self, value: TextAlignment)
    

    Source

    horizontal_text_alignment

    fn horizontal_text_alignment(self: &Self) -> TextAlignment
    

    Alias of TextAlignment, sharing its backing property and inheritance.

    Source

    set_horizontal_text_alignment

    fn set_horizontal_text_alignment(self: &Self, value: TextAlignment)
    

    Source

    line_height

    fn line_height(self: &Self) -> f64
    

    NaN chooses the natural line height, as in the shared text formatter properties.

    Source

    set_line_height

    fn set_line_height(self: &Self, value: f64)
    

    Source

    line_stacking_strategy

    fn line_stacking_strategy(self: &Self) -> LineStackingStrategy
    

    Source

    set_line_stacking_strategy

    fn set_line_stacking_strategy(self: &Self, value: LineStackingStrategy)
    

    Source

    margin

    fn margin(self: &Self) -> Thickness
    

    Source

    set_margin

    fn set_margin(self: &Self, value: Thickness)
    

    Source

    flow_direction

    fn flow_direction(self: &Self) -> FlowDirection
    

    Source

    set_flow_direction

    fn set_flow_direction(self: &Self, value: FlowDirection)
    

    Source

    Trait implementations

    Availability

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