ferroui-controls 0.3.0

The controls of FerroUI: the application model, top levels, the control set and automation peers
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use super::DefaultMenuInteractionHandler;
use crate::MenuBase;
use ferroui_base::Ref;

/// Handles user interaction for menus.
pub trait IMenuInteractionHandler {
    /// Attaches the interaction handler to a menu.
    fn attach(&self, menu: &Ref<MenuBase>);

    /// Detaches the interaction handler from the attached menu.
    fn detach(&self, menu: &Ref<MenuBase>);

    /// The handler viewed as the default menu interaction handler, if it is
    /// one.
    fn as_default_menu_interaction_handler(&self) -> Option<&DefaultMenuInteractionHandler> {
        None
    }
}