Struct zng::widget::info::WidgetInlineMeasure
source · pub struct WidgetInlineMeasure {
pub first: Size2D<Px, Px>,
pub first_wrapped: bool,
pub first_segs: Arc<Vec<InlineSegment>>,
pub last: Size2D<Px, Px>,
pub last_wrapped: bool,
pub last_segs: Arc<Vec<InlineSegment>>,
}
Expand description
Info about the input inline connecting rows of the widget.
Fields§
§first: Size2D<Px, Px>
Preferred 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: bool
Indicates 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: Size2D<Px, Px>
Preferred 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: bool
Indicates 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§
§impl<T> AnyEq for T
impl<T> AnyEq for T
source§impl<T> AnyVarValue for Twhere
T: VarValue,
impl<T> AnyVarValue for Twhere
T: VarValue,
source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
dyn Any
methods.source§fn clone_boxed(&self) -> Box<dyn AnyVarValue>
fn clone_boxed(&self) -> Box<dyn AnyVarValue>
source§fn clone_boxed_var(&self) -> Box<dyn AnyVar>
fn clone_boxed_var(&self) -> Box<dyn AnyVar>
LocalVar<Self>
.source§fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
fn eq_any(&self, other: &(dyn AnyVarValue + 'static)) -> bool
self
equals other
.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,
source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
clone_to_uninit
)§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> 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()
.