pub enum CommandState {
Enabled,
Disabled,
Hidden,
}Expand description
Runtime availability state of a command.
The app is responsible for computing and storing this; egui-command-binding
reads it to grey-out or hide menu items.
Variants§
Enabled
Normal — can be triggered.
Disabled
Visually present but not actionable (greyed out).
Hidden
Hidden from menus / toolbar.
Implementations§
Source§impl CommandState
impl CommandState
Sourcepub fn is_enabled(self) -> bool
pub fn is_enabled(self) -> bool
Returns true if the command can currently be triggered (not disabled or hidden).
Sourcepub fn is_visible(self) -> bool
pub fn is_visible(self) -> bool
Returns true if the command should be shown in menus and toolbars.
Trait Implementations§
Source§impl Clone for CommandState
impl Clone for CommandState
Source§fn clone(&self) -> CommandState
fn clone(&self) -> CommandState
Returns a duplicate of the value. Read more
1.0.0 · 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 CommandState
impl Debug for CommandState
Source§impl Default for CommandState
impl Default for CommandState
Source§fn default() -> CommandState
fn default() -> CommandState
Returns the “default value” for a type. Read more
Source§impl PartialEq for CommandState
impl PartialEq for CommandState
impl Copy for CommandState
impl Eq for CommandState
impl StructuralPartialEq for CommandState
Auto Trait Implementations§
impl Freeze for CommandState
impl RefUnwindSafe for CommandState
impl Send for CommandState
impl Sync for CommandState
impl Unpin for CommandState
impl UnsafeUnpin for CommandState
impl UnwindSafe for CommandState
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