Skip to main content

IMainMenu

Trait IMainMenu 

Source
pub trait IMainMenu {
    // Required methods
    fn is_open(&self) -> bool;
    fn close(&self);
    fn open(&self);
    fn closed(
        &self,
        handler: Rc<dyn Fn(&RoutedEventArgs)>,
    ) -> Rc<dyn IDisposable>;
}
Expand description

Defines the interface for a top-level menu.

Required Methods§

Source

fn is_open(&self) -> bool

Whether the menu is open.

Source

fn close(&self)

Closes the menu.

Source

fn open(&self)

Opens the menu in response to the Alt/F10 key.

Source

fn closed(&self, handler: Rc<dyn Fn(&RoutedEventArgs)>) -> Rc<dyn IDisposable>

Occurs when the main menu closes. Disposing the returned handle unsubscribes.

Dyn Compatibility§

This trait is dyn compatible.

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

Implementors§