Trait MenuObserver

Source
pub trait MenuObserver<T, W> {
    // Required method
    fn add_action<Listen: Clone + 'static + Fn(&mut T, &Self)>(
        &mut self,
        label: &str,
        shortcut: Shortcut,
        flags: MenuFlag,
        l: Listen,
    );
}
Expand description

A trait to bind state-aware actions to FLTK menu items.

Required Methods§

Source

fn add_action<Listen: Clone + 'static + Fn(&mut T, &Self)>( &mut self, label: &str, shortcut: Shortcut, flags: MenuFlag, l: Listen, )

Adds a menu item and attaches a state-aware action to it.

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T: Send + Sync + 'static, W: MenuExt + 'static + Clone> MenuObserver<T, W> for W