pub enum Marker {
None,
Checkbox(bool),
Choice(bool),
}Expand description
A leading marker glyph for a MenuRow::Item, drawn before its label.
Purely a rendering choice: every MenuRow::Item activates and closes the menu the same
way regardless of its marker (dreadmire’s “checkbox items fire and close” is true because
there is no special-cased checkbox behavior here, only a checkbox glyph). Grouping
Choice rows into a mutually-exclusive set (so selecting one clears the
others) is the caller’s job, the same way this crate leaves “which tab is active” bookkeeping
to whatever drives Tabs: set Choice(true) on exactly one row per group and
update it on activation.
Variants§
None
No marker: the label starts at the row’s left edge.
Checkbox(bool)
A checkbox marker ([x]/[ ]), independently toggleable.
Choice(bool)
A radio/choice marker ((o)/( )), typically one-of-many within a caller-managed group.
Trait Implementations§
impl Copy for Marker
impl Eq for Marker
impl StructuralPartialEq for Marker
Auto Trait Implementations§
impl Freeze for Marker
impl RefUnwindSafe for Marker
impl Send for Marker
impl Sync for Marker
impl Unpin for Marker
impl UnsafeUnpin for Marker
impl UnwindSafe for Marker
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<C> WithAlpha for Cwhere
C: Copy,
impl<C> WithAlpha for Cwhere
C: Copy,
§fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
fn with_alpha_first<A>(self, alpha: A) -> AlphaFirst<A, Self>
self with alpha, storing alpha before the color in memory
(see [AlphaFirst]).§fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
fn with_alpha_last<A>(self, alpha: A) -> AlphaLast<A, Self>
self with alpha, storing alpha after the color in memory
(see [AlphaLast]).