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§
§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 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()
.