MenuBase
struct · ferroui-controls · v0.5.0
struct MenuBase
Base class for menu controls.
Members
TYPEto_refcloseopenon_submenu_openedis_open_propertyopened_eventclosed_eventconstructis_openset_is_openopenedclosed
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<MenuBase>
Returns a strong reference to this object.
close
fn close(self: &Self)
Closes the menu.
open
fn open(self: &Self)
Opens the menu.
on_submenu_opened
fn on_submenu_opened(self: &Self, e: &RoutedEventArgs)
Called when a submenu opens somewhere in the menu.
is_open_property
fn is_open_property() -> &'static DirectProperty<MenuBase, bool>
Defines the IsOpen property.
opened_event
fn opened_event() -> &'static RoutedEvent<RoutedEventArgs>
Defines the Opened event.
closed_event
fn closed_event() -> &'static RoutedEvent<RoutedEventArgs>
Defines the Closed event.
construct
fn construct() -> Self
Creates the class data of a menu that uses the default menu
interaction handler; see ferroui_base::FerroObject::construct.
is_open
fn is_open(self: &Self) -> bool
Gets a value indicating whether the menu is open.
set_is_open
fn set_is_open(self: &Self, value: bool)
Sets a value indicating whether the menu is open. For deriving classes.
opened
fn opened(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Occurs when a menu is opened.
closed
fn closed(self: &Self, handler: impl Fn(&Interactive, &RoutedEventArgs) -> () + 'static) -> RoutedEventHandlerToken
Occurs when a menu is closed.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeTemplatedControlImplExtSelectingItemsControlImplExtControlImplExtMenuBaseImplExtItemsControlImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyInputElementImplExtInteractiveImplExtLayoutableImplExtFerroObjectImplExtStyledElementImplExtClassDefaultsVisualImplExtErasedDestructorIntoEitherDerefUpcast<T>Upcast<MenuBase>StaticTypeObjectTypeSubclassable<T>FerroObjectImplStyledElementImplLayoutableImplInteractiveImplControlImplTemplatedControlImplSelectingItemsControlImplIFocusScopeVisualImplInputElementImplItemsControlImplMenuBaseImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.