#[non_exhaustive]pub struct WidgetInlineInfo {
pub rows: Vec<Rect<Px, Px>>,
pub first_segs: Vec<InlineSegmentInfo>,
pub last_segs: Vec<InlineSegmentInfo>,
pub inner_size: Size2D<Px, Px>,
/* 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<Rect<Px, Px>>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: Size2D<Px, Px>Widget 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<Rect<Px, Px>>>
pub fn negative_space(&self) -> Arc<Vec<Rect<Px, Px>>>
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§fn clone(&self) -> WidgetInlineInfo
fn clone(&self) -> WidgetInlineInfo
Source§fn clone_from(&mut self, source: &WidgetInlineInfo)
fn clone_from(&mut self, source: &WidgetInlineInfo)
source. Read moreSource§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§
§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<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>. Box<dyn Any> can
then be further downcast into Box<ConcreteType> where ConcreteType implements Trait.§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.§impl<T> DowncastSync for T
impl<T> DowncastSync for 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> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§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§impl<T> NoneValue for Twhere
T: Default,
impl<T> NoneValue for Twhere
T: Default,
type NoneType = T
§fn null_value() -> T
fn null_value() -> T
§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian().