# IMainMenu

Version: 0.5.0
Framework commit: d503df2befa756e681fcdc6250e9552dc7388bea
Canonical URL: /docs/0.5.0/api/ferroui-base/input/trait-imainmenu/

**trait** · [`ferroui-base`](/docs/0.5.0/api/ferroui-base/) · v0.5.0

```rust
trait IMainMenu
```

Defines the interface for a top-level menu.

[View source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_main_menu.rs#L6)

## Members

- [`is_open`](#function-is_open)
- [`close`](#function-close)
- [`open`](#function-open)
- [`closed`](#function-closed)

<a id="function-is_open"></a>

### is_open

```rust
fn is_open(self: &Self) -> bool
```

Whether the menu is open.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_main_menu.rs#L8)

<a id="function-close"></a>

### close

```rust
fn close(self: &Self)
```

Closes the menu.

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_main_menu.rs#L11)

<a id="function-open"></a>

### open

```rust
fn open(self: &Self)
```

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_main_menu.rs#L14)

<a id="function-closed"></a>

### closed

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

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

[Source](https://github.com/wieslawsoltes/FerroUI/blob/d503df2befa756e681fcdc6250e9552dc7388bea/src/FerroUI.Base/input/i_main_menu.rs#L18)

## Availability

Extracted for `aarch64-apple-darwin`. Cargo features are listed in the [crate index](/docs/0.5.0/api/).
