#[non_exhaustive]pub struct RichLineInfo {
pub starts_new_line: bool,
pub is_wrap_start: bool,
pub ends_in_new_line: bool,
}Expand description
Info about how a rich text leaf defines new lines in a rich text.
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.starts_new_line: boolLeaf widget first line height span does not intersect the previous sibling last line height span vertically.
This heuristic allow multiple baselines in the same row (sub/superscript), it also allows bidi mixed segments that maybe have negative horizontal offsets, but very custom layouts such as a diagonal stack panel may want to provide their own definition of a line as an alternative to this API.
Note that this can be true due to wrap layout, usually this is ignored when defining a line for selection. Check
is_wrap_start to implement real lines.
is_wrap_start: boolif starts_new_line is true because the parent widget wrapped the leaf widget.
ends_in_new_line: boolLeaf widget inline layout declared multiple lines so the end is in a new line.
Note that the widget may define multiple other lines inside itself, those don’t count as “rich text lines”.
Trait Implementations§
Source§impl Clone for RichLineInfo
impl Clone for RichLineInfo
Source§fn clone(&self) -> RichLineInfo
fn clone(&self) -> RichLineInfo
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for RichLineInfo
impl Debug for RichLineInfo
Source§impl PartialEq for RichLineInfo
impl PartialEq for RichLineInfo
impl Eq for RichLineInfo
impl StructuralPartialEq for RichLineInfo
Auto Trait Implementations§
impl Freeze for RichLineInfo
impl RefUnwindSafe for RichLineInfo
impl Send for RichLineInfo
impl Sync for RichLineInfo
impl Unpin for RichLineInfo
impl UnwindSafe for RichLineInfo
Blanket Implementations§
§impl<T> AnyEq for T
impl<T> AnyEq for T
Source§impl<T> AnyVarValue for T
impl<T> AnyVarValue for T
Source§fn clone_boxed(&self) -> BoxAnyVarValue
fn clone_boxed(&self) -> BoxAnyVarValue
Source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self and other are equal.Source§fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
fn try_swap(&mut self, other: &mut (dyn AnyVarValue + 'static)) -> bool
other if both are of the same type.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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.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