#[non_exhaustive]pub struct WidgetInlineMeasure {
pub first: PxSize,
pub first_wrapped: bool,
pub first_segs: Arc<Vec<InlineSegment>>,
pub last: PxSize,
pub last_wrapped: bool,
pub last_segs: Arc<Vec<InlineSegment>>,
}Expand description
Info about the input inline connecting 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.first: PxSizePreferred first size.
In left-to-right direction the origin is top_left, in right-to-left direction the origin is top_right - first.width.
first_wrapped: boolIndicates that first starts in the next row, not in the current row defined by the inline constraints.
first_segs: Arc<Vec<InlineSegment>>Inline segments in the first row.
The sum of segment widths must be less or equal to the first.width.
last: PxSizePreferred last size.
In left-to-right direction the origin is bottom_left - last.height, in right-to-left direction
the origin is bottom_right - last.
Must be equal to first if did not wrap.
Must not be empty if first is not empty, that is, must not wrap if the last item can fit in the previous row.
last_wrapped: boolIndicates that last starts in a next row, not in the same row as the first.
last_segs: Arc<Vec<InlineSegment>>Inline segments in the last row.
The sum of segment widths must be less or equal to the last.width.
Implementations§
Source§impl WidgetInlineMeasure
impl WidgetInlineMeasure
Sourcepub fn with_first_segs(&mut self, f: impl FnOnce(&mut Vec<InlineSegment>))
pub fn with_first_segs(&mut self, f: impl FnOnce(&mut Vec<InlineSegment>))
Visit a mutable reference to the new first_segs value, f is called with
an empty vec that can be reused or new.
Sourcepub fn with_last_segs(&mut self, f: impl FnOnce(&mut Vec<InlineSegment>))
pub fn with_last_segs(&mut self, f: impl FnOnce(&mut Vec<InlineSegment>))
Visit a mutable reference to the new last_segs value, f is called with
an empty vec that can be reused or new.
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 WidgetInlineMeasure
impl Clone for WidgetInlineMeasure
Source§fn clone(&self) -> WidgetInlineMeasure
fn clone(&self) -> WidgetInlineMeasure
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for WidgetInlineMeasure
impl Debug for WidgetInlineMeasure
Source§impl Default for WidgetInlineMeasure
impl Default for WidgetInlineMeasure
Source§fn default() -> WidgetInlineMeasure
fn default() -> WidgetInlineMeasure
Source§impl PartialEq for WidgetInlineMeasure
impl PartialEq for WidgetInlineMeasure
impl StructuralPartialEq for WidgetInlineMeasure
Auto Trait Implementations§
impl Freeze for WidgetInlineMeasure
impl RefUnwindSafe for WidgetInlineMeasure
impl Send for WidgetInlineMeasure
impl Sync for WidgetInlineMeasure
impl Unpin for WidgetInlineMeasure
impl UnwindSafe for WidgetInlineMeasure
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