MenuItemAutomationPeer
struct · ferroui-controls · v0.5.0
struct MenuItemAutomationPeer
An automation peer which represents a MenuItem.
Members
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<MenuItemAutomationPeer>
Returns a strong reference to this object.
construct
fn construct(owner: &MenuItem) -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new(owner: &MenuItem) -> Ref<Self>
Initializes a new peer of owner.
owner
fn owner(self: &Self) -> Ref<MenuItem>
Gets the owning menu item.
expand_collapse_state
fn expand_collapse_state(self: &Self) -> ExpandCollapseState
Gets the state, expanded or collapsed, of the submenu of the item (the expand/collapse provider contract).
shows_menu
fn shows_menu(self: &Self) -> bool
Gets a value indicating whether expanding the item shows a menu (the expand/collapse provider contract).
invoke
fn invoke(self: &Self) -> Result<(), ElementNotEnabledError>
Sends a request to activate the menu item (the invoke provider contract).
expand
fn expand(self: &Self) -> Result<(), AutomationError>
Opens the submenu of the item (the expand/collapse provider contract).
Errors
AutomationError::ElementNotEnabled if the item is not enabled,
AutomationError::InvalidOperation if it has no submenu.
collapse
fn collapse(self: &Self) -> Result<(), AutomationError>
Closes the submenu of the item (the expand/collapse provider contract).
Errors
AutomationError::ElementNotEnabled if the item is not enabled,
AutomationError::InvalidOperation if it has no submenu.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeAutomationPeerImplExtControlAutomationPeerImplExtBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtClassDefaultsErasedDestructorIntoEitherDerefUpcast<T>Upcast<MenuItemAutomationPeer>StaticTypeObjectTypeSubclassable<T>FerroObjectImplControlAutomationPeerImplAutomationPeerImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.