pub struct SegmentedControlStyleConfig {
pub slots: SegmentSlots,
pub selected: Signal<usize>,
pub hovered_segment: Signal<Option<usize>>,
pub focus_origin: Signal<Option<FocusOrigin>>,
pub is_enabled: Signal<bool>,
}Fields§
§slots: SegmentSlotsResolved slot geometry for the current layout pass, published by
the widget. Replaces the old segment_count + divide-by-n
derivation, which cannot express overflow or non-uniform widths.
selected: Signal<usize>Current selection, as an index into the live segment list.
Resolve it to a slot with SegmentSlots::slot_of.
hovered_segment: Signal<Option<usize>>Some(live segment index) while the pointer is over a segment.
The recipe reads this to paint the hover tint behind the
non-selected segment under the pointer. A segment that overflowed
while hovered simply resolves to no slot, so a stale value paints
nothing.
focus_origin: Signal<Option<FocusOrigin>>Current focus origin (None when unfocused). Any focus
triggers the accent-tinted selected-segment appearance; only
keyboard focus paints the outer focus ring envelope.
is_enabled: Signal<bool>Reactive — re-emits when arena enabled_state flips for this
widget (or any ancestor). Chrome implementations should
subscribe at BindingLevel::RepaintOnly so they re-paint on
flip.
Trait Implementations§
Source§impl Clone for SegmentedControlStyleConfig
impl Clone for SegmentedControlStyleConfig
Source§fn clone(&self) -> SegmentedControlStyleConfig
fn clone(&self) -> SegmentedControlStyleConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more