#[non_exhaustive]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 (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.fonts: FontListSized faces.
shaped_text: ShapedTextLayout text.
overflow: Option<TextOverflowInfo>Shaped text overflow info.
overflow_suffix: Option<ShapedText>Shaped text used as suffix when shaped_text overflows.
shaped_text_version: u32Version 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: PxComputed 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: PxComputed 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: PxComputed 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: PxComputed 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: PxThe x offset used when pressing up or down.
render_info: RenderInfoInfo about the last text render or render update.
viewport: PxSizeLatest 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