Trait UIMenuLeaf

Source
pub unsafe trait UIMenuLeaf: NSObjectProtocol + MainThreadOnly {
Show 15 methods // Provided methods unsafe fn title(&self) -> Retained<NSString> where Self: Sized + Message { ... } unsafe fn setTitle(&self, title: &NSString) where Self: Sized + Message { ... } unsafe fn image(&self) -> Option<Retained<UIImage>> where Self: Sized + Message { ... } unsafe fn setImage(&self, image: Option<&UIImage>) where Self: Sized + Message { ... } unsafe fn selectedImage(&self) -> Option<Retained<UIImage>> where Self: Sized + Message { ... } unsafe fn setSelectedImage(&self, selected_image: Option<&UIImage>) where Self: Sized + Message { ... } unsafe fn discoverabilityTitle(&self) -> Option<Retained<NSString>> where Self: Sized + Message { ... } unsafe fn setDiscoverabilityTitle( &self, discoverability_title: Option<&NSString>, ) where Self: Sized + Message { ... } unsafe fn attributes(&self) -> UIMenuElementAttributes where Self: Sized + Message { ... } unsafe fn setAttributes(&self, attributes: UIMenuElementAttributes) where Self: Sized + Message { ... } unsafe fn state(&self) -> UIMenuElementState where Self: Sized + Message { ... } unsafe fn setState(&self, state: UIMenuElementState) where Self: Sized + Message { ... } unsafe fn sender(&self) -> Option<Retained<AnyObject>> where Self: Sized + Message { ... } unsafe fn presentationSourceItem( &self, ) -> Option<Retained<ProtocolObject<dyn UIPopoverPresentationControllerSourceItem>>> where Self: Sized + Message { ... } unsafe fn performWithSender_target( &self, sender: Option<&AnyObject>, target: Option<&AnyObject>, ) where Self: Sized + Message { ... }
}
Available on crate feature UIMenuLeaf only.
Expand description

Provided Methods§

Source

unsafe fn title(&self) -> Retained<NSString>
where Self: Sized + Message,

Short display title.

Source

unsafe fn setTitle(&self, title: &NSString)
where Self: Sized + Message,

Setter for title.

Source

unsafe fn image(&self) -> Option<Retained<UIImage>>
where Self: Sized + Message,

Available on crate feature UIImage only.

Image that can appear next to this element.

Source

unsafe fn setImage(&self, image: Option<&UIImage>)
where Self: Sized + Message,

Available on crate feature UIImage only.

Setter for image.

Source

unsafe fn selectedImage(&self) -> Option<Retained<UIImage>>
where Self: Sized + Message,

Available on crate feature UIImage only.

Image that can appear next to this action when the state is UIMenuElementStateOn

Source

unsafe fn setSelectedImage(&self, selected_image: Option<&UIImage>)
where Self: Sized + Message,

Available on crate feature UIImage only.

Setter for selectedImage.

Source

unsafe fn discoverabilityTitle(&self) -> Option<Retained<NSString>>
where Self: Sized + Message,

Elaborated title used in keyboard shortcut overlay.

Source

unsafe fn setDiscoverabilityTitle( &self, discoverability_title: Option<&NSString>, )
where Self: Sized + Message,

Source

unsafe fn attributes(&self) -> UIMenuElementAttributes
where Self: Sized + Message,

Available on crate feature UIMenuElement only.

The element’s attributes.

Source

unsafe fn setAttributes(&self, attributes: UIMenuElementAttributes)
where Self: Sized + Message,

Available on crate feature UIMenuElement only.

Setter for attributes.

Source

unsafe fn state(&self) -> UIMenuElementState
where Self: Sized + Message,

Available on crate feature UIMenuElement only.

The element’s selection state.

Source

unsafe fn setState(&self, state: UIMenuElementState)
where Self: Sized + Message,

Available on crate feature UIMenuElement only.

Setter for state.

Source

unsafe fn sender(&self) -> Option<Retained<AnyObject>>
where Self: Sized + Message,

The object on behalf of which the element’s primary action is being performed. This property is only populated during the execution of the element’s primary action (i.e. its handler or selector) if available.

Source

unsafe fn presentationSourceItem( &self, ) -> Option<Retained<ProtocolObject<dyn UIPopoverPresentationControllerSourceItem>>>
where Self: Sized + Message,

Available on crate feature UIPopoverPresentationControllerSourceItem only.

Source item for subsequent presentations. For example, an element displayed in a menu attached to a UIButtonmay return the button so that a popover may be presented from it when the element is tapped. If available, this property is only populated during the execution of the element’s action (i.e. its handler or selector).

Source

unsafe fn performWithSender_target( &self, sender: Option<&AnyObject>, target: Option<&AnyObject>, )
where Self: Sized + Message,

Performs the element’s primary action (i.e. it’s handler or selector).

Trait Implementations§

Source§

impl ProtocolType for dyn UIMenuLeaf

Source§

const NAME: &'static str = "UIMenuLeaf"

The name of the Objective-C protocol that this type represents. Read more
Source§

fn protocol() -> Option<&'static AnyProtocol>

Get a reference to the Objective-C protocol object that this type represents. Read more
Source§

impl<T> ImplementedBy<T> for dyn UIMenuLeaf
where T: ?Sized + Message + UIMenuLeaf,

Implementations on Foreign Types§

Source§

impl<T> UIMenuLeaf for ProtocolObject<T>
where T: ?Sized + UIMenuLeaf,

Implementors§

Source§

impl UIMenuLeaf for UIAction

Available on crate features UIMenuElement and UIAction only.
Source§

impl UIMenuLeaf for UICommand

Available on crate features UIMenuElement and UICommand only.
Source§

impl UIMenuLeaf for UIKeyCommand

Available on crate features UICommand and UIMenuElement and UIKeyCommand only.
Source§

impl UIMenuLeaf for UIWindowSceneActivationAction

Available on crate features UIAction and UIMenuElement and UIWindowSceneActivationAction only.