Struct cosmic_text::BufferLine

source ·
pub struct BufferLine { /* private fields */ }
Expand description

A line (or paragraph) of text that is shaped and laid out

Implementations

Create a new line with the given text and attributes list Cached shaping and layout can be done using the Self::shape and Self::layout functions

Get current text

Set text and attributes list

Will reset shape and layout if it differs from current text and attributes list. Returns true if the line was reset

Get attributes list

Set attributes list

Will reset shape and layout if it differs from current attributes list. Returns true if the line was reset

Get simple wrapping setting (wrap by characters only)

Set simple wrapping setting (wrap by characters only)

Will reset shape and layout if it differs from current simple wrapping setting. Returns true if the line was reset

Append line at end of this line

The wrap setting of the appended line will be lost

Split off new line at index

Reset shaping and layout information

Reset only layout information

Check if shaping and layout information is cleared

Shape line, will cache results

Get line shaping cache

Layout line, will cache results

Get line layout cache

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.