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 { ... }
}UIMenuLeaf only.Expand description
Provided Methods§
Sourceunsafe fn image(&self) -> Option<Retained<UIImage>>
Available on crate feature UIImage only.
unsafe fn image(&self) -> Option<Retained<UIImage>>
UIImage only.Image that can appear next to this element.
Sourceunsafe fn setImage(&self, image: Option<&UIImage>)
Available on crate feature UIImage only.
unsafe fn setImage(&self, image: Option<&UIImage>)
UIImage only.Setter for image.
Sourceunsafe fn selectedImage(&self) -> Option<Retained<UIImage>>
Available on crate feature UIImage only.
unsafe fn selectedImage(&self) -> Option<Retained<UIImage>>
UIImage only.Image that can appear next to this action when the state is UIMenuElementStateOn
Sourceunsafe fn setSelectedImage(&self, selected_image: Option<&UIImage>)
Available on crate feature UIImage only.
unsafe fn setSelectedImage(&self, selected_image: Option<&UIImage>)
UIImage only.Setter for selectedImage.
Sourceunsafe fn discoverabilityTitle(&self) -> Option<Retained<NSString>>
unsafe fn discoverabilityTitle(&self) -> Option<Retained<NSString>>
Elaborated title used in keyboard shortcut overlay.
Sourceunsafe fn setDiscoverabilityTitle(
&self,
discoverability_title: Option<&NSString>,
)
unsafe fn setDiscoverabilityTitle( &self, discoverability_title: Option<&NSString>, )
Setter for discoverabilityTitle.
Sourceunsafe fn attributes(&self) -> UIMenuElementAttributes
Available on crate feature UIMenuElement only.
unsafe fn attributes(&self) -> UIMenuElementAttributes
UIMenuElement only.The element’s attributes.
Sourceunsafe fn setAttributes(&self, attributes: UIMenuElementAttributes)
Available on crate feature UIMenuElement only.
unsafe fn setAttributes(&self, attributes: UIMenuElementAttributes)
UIMenuElement only.Setter for attributes.
Sourceunsafe fn state(&self) -> UIMenuElementState
Available on crate feature UIMenuElement only.
unsafe fn state(&self) -> UIMenuElementState
UIMenuElement only.The element’s selection state.
Sourceunsafe fn setState(&self, state: UIMenuElementState)
Available on crate feature UIMenuElement only.
unsafe fn setState(&self, state: UIMenuElementState)
UIMenuElement only.Setter for state.
Sourceunsafe fn sender(&self) -> Option<Retained<AnyObject>>
unsafe fn sender(&self) -> Option<Retained<AnyObject>>
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.
Sourceunsafe fn presentationSourceItem(
&self,
) -> Option<Retained<ProtocolObject<dyn UIPopoverPresentationControllerSourceItem>>>
Available on crate feature UIPopoverPresentationControllerSourceItem only.
unsafe fn presentationSourceItem( &self, ) -> Option<Retained<ProtocolObject<dyn UIPopoverPresentationControllerSourceItem>>>
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).
Trait Implementations§
Source§impl ProtocolType for dyn UIMenuLeaf
impl ProtocolType for dyn UIMenuLeaf
impl<T> ImplementedBy<T> for dyn UIMenuLeaf
Implementations on Foreign Types§
impl<T> UIMenuLeaf for ProtocolObject<T>where
T: ?Sized + UIMenuLeaf,
Implementors§
impl UIMenuLeaf for UIAction
UIMenuElement and UIAction only.impl UIMenuLeaf for UICommand
UIMenuElement and UICommand only.impl UIMenuLeaf for UIKeyCommand
UICommand and UIMenuElement and UIKeyCommand only.impl UIMenuLeaf for UIWindowSceneActivationAction
UIAction and UIMenuElement and UIWindowSceneActivationAction only.