pub struct SegmentSlotGeometry {
pub frame: Rect,
pub segments: Vec<Rect>,
pub order: Vec<usize>,
pub overflow: Option<Rect>,
}Expand description
Resolved, control-local geometry for one layout pass.
A slot is a position on the strip. A segment is an entry in the
control’s live segment list. The two coincide until the control
overflows, after which order maps between them —
the last slot may hold a promoted segment from anywhere in the list.
Fields§
§frame: RectThe stroked outer frame, inside the focus-ring envelope.
segments: Vec<Rect>One rectangle per visible slot, in visual (reading) order.
order: Vec<usize>order[slot] is the live segment index drawn in that slot.
Same length as segments.
overflow: Option<Rect>The overflow trigger’s rectangle, when the control is overflowing. Paint-only — the trigger is a real widget whose bounds come from the layout pass; never hit-test against this.
Trait Implementations§
Source§impl Clone for SegmentSlotGeometry
impl Clone for SegmentSlotGeometry
Source§fn clone(&self) -> SegmentSlotGeometry
fn clone(&self) -> SegmentSlotGeometry
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SegmentSlotGeometry
impl Debug for SegmentSlotGeometry
Source§impl Default for SegmentSlotGeometry
impl Default for SegmentSlotGeometry
Source§fn default() -> SegmentSlotGeometry
fn default() -> SegmentSlotGeometry
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SegmentSlotGeometry
impl RefUnwindSafe for SegmentSlotGeometry
impl Send for SegmentSlotGeometry
impl Sync for SegmentSlotGeometry
impl Unpin for SegmentSlotGeometry
impl UnsafeUnpin for SegmentSlotGeometry
impl UnwindSafe for SegmentSlotGeometry
Blanket Implementations§
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
Mutably borrows from an owned value. Read more