Skip to main content

ElementCommandGatingExt

Trait ElementCommandGatingExt 

Source
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§

Source

fn command_is_enabled(&self, command: &CommandId) -> bool

Source

fn command_is_enabled_with_fallback_input_context( &self, command: &CommandId, fallback_input_ctx: InputContext, ) -> bool

Source

fn dispatch_command_if_enabled(&mut self, command: CommandId) -> bool

Source

fn dispatch_command_if_enabled_with_fallback_input_context( &mut self, command: CommandId, fallback_input_ctx: InputContext, ) -> bool

Source

fn action_is_enabled(&self, action: &ActionId) -> bool

Action-first naming parity: ActionId uses the same ID strings as CommandId in v1.

Source

fn dispatch_action_if_enabled(&mut self, action: ActionId) -> bool

Action-first naming parity: dispatch an ActionId if enabled.

Implementors§