Skip to main content

IAccessKeyHandler

Trait IAccessKeyHandler 

Source
pub trait IAccessKeyHandler {
    // Required methods
    fn main_menu(&self) -> Option<Rc<dyn IMainMenu>>;
    fn set_main_menu(&self, value: Option<Rc<dyn IMainMenu>>);
    fn set_owner(&self, owner: &Ref<InputElement>);
    fn register(&self, access_key: &str, element: &Ref<InputElement>);
    fn unregister(&self, element: &InputElement);
}
Expand description

Defines the interface for classes that handle access keys for a window.

Required Methods§

Source

fn main_menu(&self) -> Option<Rc<dyn IMainMenu>>

The window’s main menu.

Source

fn set_main_menu(&self, value: Option<Rc<dyn IMainMenu>>)

Sets the window’s main menu.

Source

fn set_owner(&self, owner: &Ref<InputElement>)

Sets the owner of the access key handler.

This method can only be called once, typically by the owner itself on creation.

Source

fn register(&self, access_key: &str, element: &Ref<InputElement>)

Registers an input element to be associated with an access key.

Source

fn unregister(&self, element: &InputElement)

Unregisters the access keys associated with the input element.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§