#[non_exhaustive]pub struct WidgetInlineInfo {
pub rows: Vec<PxRect>,
pub first_segs: Vec<InlineSegmentInfo>,
pub last_segs: Vec<InlineSegmentInfo>,
pub inner_size: PxSize,
/* private fields */
}Expand description
Info about the inlined rows of the widget.
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.rows: Vec<PxRect>Last layout rows of the widget.
The rectangles are in the widget’s inner space, from top to bottom.
first_segs: Vec<InlineSegmentInfo>Segments of the first row.
If this is empty the entire row width is a continuous segment, otherwise the row is segmented and the widget can be interleaved with sibling widgets due to Unicode bidirectional text sorting algorithm.
Note that the segment count may be less then WidgetInlineMeasure::first_segs as contiguous segments
may be merged.
The segments are from left to right.
last_segs: Vec<InlineSegmentInfo>Segments of the last row.
inner_size: PxSizeWidget inner size when the rows where last updated.
Implementations§
Source§impl WidgetInlineInfo
impl WidgetInlineInfo
Sourcepub fn set_first_segs(&mut self, segs: impl Iterator<Item = InlineSegmentInfo>)
pub fn set_first_segs(&mut self, segs: impl Iterator<Item = InlineSegmentInfo>)
Replace the first_segs with segs.
The segments are sorted when needed, but prefer inputs that are mostly sorted.
The segments are merged when there is no gap or there is a small one pixel overlap to the previous segment.
Sourcepub fn set_last_segs(&mut self, segs: impl Iterator<Item = InlineSegmentInfo>)
pub fn set_last_segs(&mut self, segs: impl Iterator<Item = InlineSegmentInfo>)
Replace the last_segs with segs.
The segments are sorted when needed, but prefer inputs that are mostly sorted.
The segments are merged when there is no gap or there is a small one pixel overlap to the previous segment.
Sourcepub fn negative_space(&self) -> Arc<Vec<PxRect>>
pub fn negative_space(&self) -> Arc<Vec<PxRect>>
Gets or computes the negative space of the rows in the inner_size space, that is, all the areas that are
not covered by any row and not covered by the first and last row segments.
This is computed on demand and cached.
Sourcepub fn invalidate_negative_space(&mut self)
pub fn invalidate_negative_space(&mut self)
Invalidates the negative_space cache.
Sourcepub fn is_default(&self) -> bool
pub fn is_default(&self) -> bool
If all value are not different from initial.
This indicates the widget has not handled the inline config yet.
Trait Implementations§
Source§impl Clone for WidgetInlineInfo
impl Clone for WidgetInlineInfo
Source§impl Debug for WidgetInlineInfo
impl Debug for WidgetInlineInfo
Source§impl Default for WidgetInlineInfo
impl Default for WidgetInlineInfo
Source§fn default() -> WidgetInlineInfo
fn default() -> WidgetInlineInfo
Source§impl PartialEq for WidgetInlineInfo
impl PartialEq for WidgetInlineInfo
Auto Trait Implementations§
impl !Freeze for WidgetInlineInfo
impl !RefUnwindSafe for WidgetInlineInfo
impl Send for WidgetInlineInfo
impl Sync for WidgetInlineInfo
impl Unpin for WidgetInlineInfo
impl UnwindSafe for WidgetInlineInfo
Blanket Implementations§
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<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