FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    MenuBase

    struct · ferroui-controls · v0.5.0

    struct MenuBase
    

    Base class for menu controls.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<MenuBase>
    

    Returns a strong reference to this object.

    Source

    close

    fn close(self: &Self)
    

    Closes the menu.

    Source

    open

    fn open(self: &Self)
    

    Opens the menu.

    Source

    on_submenu_opened

    fn on_submenu_opened(self: &Self, e: &RoutedEventArgs)
    

    Called when a submenu opens somewhere in the menu.

    Source

    is_open_property

    fn is_open_property() -> &'static DirectProperty<MenuBase, bool>
    

    Defines the IsOpen property.

    Source

    opened_event

    fn opened_event() -> &'static RoutedEvent<RoutedEventArgs>
    

    Defines the Opened event.

    Source

    closed_event

    fn closed_event() -> &'static RoutedEvent<RoutedEventArgs>
    

    Defines the Closed event.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data of a menu that uses the default menu interaction handler; see ferroui_base::FerroObject::construct.

    Source

    is_open

    fn is_open(self: &Self) -> bool
    

    Gets a value indicating whether the menu is open.

    Source

    set_is_open

    fn set_is_open(self: &Self, value: bool)
    

    Sets a value indicating whether the menu is open. For deriving classes.

    Source

    opened

    fn opened(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    Occurs when a menu is opened.

    Source

    closed

    fn closed(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
    

    Occurs when a menu is closed.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.