[][src]Trait kas::widget::Menu

pub trait Menu: Widget {
    fn menu_is_open(&self) -> bool { ... }
fn menu_path(&mut self, _mgr: &mut Manager, _target: Option<WidgetId>) { ... } }

Trait governing menus, sub-menus and menu-entries

Provided methods

fn menu_is_open(&self) -> bool

Report whether one's own menu is open

By default, this is false.

fn menu_path(&mut self, _mgr: &mut Manager, _target: Option<WidgetId>)

Open or close a sub-menu, including parents

Given Some(id) = target, the sub-menu with this id should open its menu; if it has child-menus, these should close; and if any ancestors are menus, these should open.

target == None implies that all menus should close.

Loading content...

Trait Implementations

impl<M: Menu + Sized> Boxed<dyn Menu<Msg = <M as Handler>::Msg> + 'static> for M[src]

Implementations on Foreign Types

impl<M: 'static> Menu for Box<dyn Menu<Msg = M>>[src]

Loading content...

Implementors

impl<D: Directional, W: Menu> Menu for MenuBar<D, W>[src]

impl<D: Directional, W: Menu> Menu for SubMenu<D, W>[src]

impl<M: Clone + Debug> Menu for MenuEntry<M>[src]

impl<M: From<VoidMsg>> Menu for MenuToggle<M>[src]

impl<M: Debug> Menu for Separator<M>[src]

A separator is a valid menu widget

Loading content...