pub trait ElementCommandGatingExt {
// Required methods
fn command_is_enabled(&self, command: &CommandId) -> bool;
fn command_is_enabled_with_fallback_input_context(
&self,
command: &CommandId,
fallback_input_ctx: InputContext,
) -> bool;
fn dispatch_command_if_enabled(&mut self, command: CommandId) -> bool;
fn dispatch_command_if_enabled_with_fallback_input_context(
&mut self,
command: CommandId,
fallback_input_ctx: InputContext,
) -> bool;
fn action_is_enabled(&self, action: &ActionId) -> bool;
fn dispatch_action_if_enabled(&mut self, action: ActionId) -> bool;
}Required Methods§
fn command_is_enabled(&self, command: &CommandId) -> bool
fn command_is_enabled_with_fallback_input_context( &self, command: &CommandId, fallback_input_ctx: InputContext, ) -> bool
fn dispatch_command_if_enabled(&mut self, command: CommandId) -> bool
fn dispatch_command_if_enabled_with_fallback_input_context( &mut self, command: CommandId, fallback_input_ctx: InputContext, ) -> bool
Sourcefn action_is_enabled(&self, action: &ActionId) -> bool
fn action_is_enabled(&self, action: &ActionId) -> bool
Action-first naming parity: ActionId uses the same ID strings as CommandId in v1.
Sourcefn dispatch_action_if_enabled(&mut self, action: ActionId) -> bool
fn dispatch_action_if_enabled(&mut self, action: ActionId) -> bool
Action-first naming parity: dispatch an ActionId if enabled.