pub struct MenuBarUi<'u> { /* private fields */ }Expand description
The handle passed to a MenuBar::show closure for declaring menu
triggers. Each call to MenuBarUi::menu paints one trigger and its
dropdown.
Implementations§
Source§impl<'u> MenuBarUi<'u>
impl<'u> MenuBarUi<'u>
Paint a single menu trigger with label and attach a dropdown
populated by body. Clicking an item inside the dropdown dismisses
the menu — the standard pattern for action-style menus (File / Edit
/ etc.). For settings-style menus that should stay open while the
user toggles items, use MenuBarUi::menu_keep_open.
Returns Some with the body closure’s return value while the
dropdown is open, None while it’s closed.
Like MenuBarUi::menu, but the dropdown stays open while the
user clicks items inside it. Useful for menus full of toggles
(checkboxes, radio groups) where the user expects to see the state
change without the menu vanishing. The menu still closes on click
outside, on Esc, or when the user clicks the trigger again.