FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    LogicalTextRunEnumerator

    struct · ferroui-base · v0.5.0

    struct LogicalTextRunEnumerator<'a>
    

    Walks the runs of a TextLine in logical (source-text) order. This is the order that splits and length-based offsets are defined in, and is what every TextCollapsingProperties::collapse implementation needs to see — unlike TextLine::text_runs, which exposes the post-BiDi visual ordering used for rendering.

    When the line has been finalized (the normal case after TextLineImpl::finalize_line), the enumerator iterates over the indexed text runs — a level-resolved table that maps each run back to its original logical position. If the line hasn't been finalized (or the line is not a TextLineImpl), it falls back to the raw TextLine::text_runs list.

    Internal upstream; public so that the Skia unit tests reach it.

    View source

    Members

    new

    fn new(line: &'a dyn TextLine) -> Self
    

    Source

    with_direction

    fn with_direction(line: &'a dyn TextLine, backward: bool) -> Self
    

    Source

    count

    fn count(self: &Self) -> i32
    

    The number of runs.

    Source

    move_next

    fn move_next(self: &mut Self) -> Option<Rc<dyn TextRun>>
    

    Source

    Trait implementations

    • Send
    • Sync
    • Freeze
    • UnsafeUnpin
    • Unpin
    • UnwindSafe
    • RefUnwindSafe
    • ClassDefaults
    • Borrow<T>
    • BorrowMut<T>
    • Into<U>
    • From<T>
    • TryInto<U>
    • TryFrom<U>
    • Any
    • ErasedDestructor
    • IntoEither

    Availability

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