pub struct SegmentEvent {
pub index: usize,
pub menu_trigger: Option<SegmentMenuTrigger>,
pub rect: Rect,
}Expand description
Interaction event emitted by super::MacSegmentedControl::show_with_events.
Fields§
§index: usizeZero-based index of the interacted segment.
None when selecting the segment; Some(trigger) when opening its attached menu.
rect: RectScreen-space bounding rectangle of the target segment for anchoring a menu or popover.
Implementations§
Source§impl SegmentEvent
impl SegmentEvent
Returns true when this event requests opening the segment’s attached menu rather than selecting it.
Trait Implementations§
Source§impl Clone for SegmentEvent
impl Clone for SegmentEvent
impl Copy for SegmentEvent
Source§impl Debug for SegmentEvent
impl Debug for SegmentEvent
Source§impl PartialEq for SegmentEvent
impl PartialEq for SegmentEvent
impl StructuralPartialEq for SegmentEvent
Auto Trait Implementations§
impl Forget for SegmentEvent
impl Freeze for SegmentEvent
impl Move for SegmentEvent
impl RefUnwindSafe for SegmentEvent
impl Send for SegmentEvent
impl Sync for SegmentEvent
impl Unpin for SegmentEvent
impl UnsafeUnpin for SegmentEvent
impl UnwindSafe for SegmentEvent
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> ⓘ
Converts
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> ⓘ
Converts
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