pub struct LaidoutText {Show 18 fields
pub fonts: FontList,
pub shaped_text: ShapedText,
pub overflow: Option<TextOverflowInfo>,
pub overflow_suffix: Option<ShapedText>,
pub shaped_text_version: u32,
pub overlines: Vec<(PxPoint, Px)>,
pub overline_thickness: Px,
pub strikethroughs: Vec<(PxPoint, Px)>,
pub strikethrough_thickness: Px,
pub underlines: Vec<(PxPoint, Px)>,
pub underline_thickness: Px,
pub ime_underlines: Vec<(PxPoint, Px)>,
pub ime_underline_thickness: Px,
pub caret_origin: Option<PxPoint>,
pub caret_selection_origin: Option<PxPoint>,
pub caret_retained_x: Px,
pub render_info: RenderInfo,
pub viewport: PxSize,
}
Expand description
Represents the laidout text.
Use TEXT
to get.
Fields§
§fonts: FontList
Sized faces
.
shaped_text: ShapedText
Layout text.
overflow: Option<TextOverflowInfo>
Shaped text overflow info.
overflow_suffix: Option<ShapedText>
Shaped text used as suffix when shaped_text
overflows.
shaped_text_version: u32
Version updated every time the shaped_text
is reshaped.
overlines: Vec<(PxPoint, Px)>
List of overline segments, defining origin and width of each line.
Note that overlines are only computed if the overline_thickness
is more than 0
.
Default overlines are rendered by render_overlines
.
overline_thickness: Px
Computed OVERLINE_THICKNESS_VAR
.
strikethroughs: Vec<(PxPoint, Px)>
List of strikethrough segments, defining origin and width of each line.
Note that strikethroughs are only computed if the strikethrough_thickness
is more than 0
.
Default overlines are rendered by render_strikethroughs
.
strikethrough_thickness: Px
Computed STRIKETHROUGH_THICKNESS_VAR
.
underlines: Vec<(PxPoint, Px)>
List of underline segments, defining origin and width of each line.
Note that underlines are only computed if the underline_thickness
is more than 0
. These
underlines never cover the IME review text range.
Default underlines are rendered by render_underlines
.
underline_thickness: Px
Computed UNDERLINE_THICKNESS_VAR
.
ime_underlines: Vec<(PxPoint, Px)>
List of underline segments for IME preview text, defining origin and width of each line.
Note that underlines are only computed if the ime_underline_thickness
is more than 0
.
Default underlines are rendered by render_underlines
.
ime_underline_thickness: Px
Computed IME_UNDERLINE_THICKNESS_VAR
.
caret_origin: Option<PxPoint>
Top-middle offset of the caret index in the shaped text.
caret_selection_origin: Option<PxPoint>
Top-middle offset of the caret selection_index in the shaped text.
caret_retained_x: Px
The x offset used when pressing up or down.
render_info: RenderInfo
Info about the last text render or render update.
viewport: PxSize
Latest layout viewport.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LaidoutText
impl !RefUnwindSafe for LaidoutText
impl Send for LaidoutText
impl Sync for LaidoutText
impl Unpin for LaidoutText
impl !UnwindSafe for LaidoutText
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
source§impl<T> FsChangeNote for T
impl<T> FsChangeNote for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more