pub trait CommandShortcutExt {
// Required methods
fn shortcut(self) -> Box<dyn VarBoxed<Shortcuts>>;
fn shortcut_filter(self) -> Box<dyn VarBoxed<ShortcutFilter>>;
fn init_shortcut(self, shortcut: impl Into<Shortcuts>) -> Self;
fn init_shortcut_filter(self, filter: impl Into<ShortcutFilter>) -> Self;
// Provided method
fn shortcut_txt(self) -> Box<dyn VarBoxed<Txt>>
where Self: Sized { ... }
}
Expand description
Adds the shortcut
metadata.
If a command has a shortcut the GestureManager
will invoke the command when the shortcut is pressed
the command is enabled, if the command target is a widget it will also be focused. See the GESTURES
service documentation for details on how shortcuts are resolved.
Required Methods§
sourcefn shortcut(self) -> Box<dyn VarBoxed<Shortcuts>>
fn shortcut(self) -> Box<dyn VarBoxed<Shortcuts>>
Gets a read-write variable that is zero-or-more shortcuts that invoke the command.
sourcefn shortcut_filter(self) -> Box<dyn VarBoxed<ShortcutFilter>>
fn shortcut_filter(self) -> Box<dyn VarBoxed<ShortcutFilter>>
Gets a read-write variable that sets a filter for when the shortcut
is valid.
sourcefn init_shortcut(self, shortcut: impl Into<Shortcuts>) -> Self
fn init_shortcut(self, shortcut: impl Into<Shortcuts>) -> Self
Sets the initial shortcuts.
sourcefn init_shortcut_filter(self, filter: impl Into<ShortcutFilter>) -> Self
fn init_shortcut_filter(self, filter: impl Into<ShortcutFilter>) -> Self
Sets the initial shortcut filters.
Provided Methods§
sourcefn shortcut_txt(self) -> Box<dyn VarBoxed<Txt>>where
Self: Sized,
fn shortcut_txt(self) -> Box<dyn VarBoxed<Txt>>where
Self: Sized,
Gets a read-only variable that is the display text for the first shortcut.
Object Safety§
This trait is not object safe.