pub unsafe trait UIMenuLeaf: NSObjectProtocol + MainThreadOnly {
Show 17 methods
// Provided methods
fn title(&self) -> Retained<NSString>
where Self: Sized + Message { ... }
fn setTitle(&self, title: &NSString)
where Self: Sized + Message { ... }
fn image(&self) -> Option<Retained<UIImage>>
where Self: Sized + Message { ... }
fn setImage(&self, image: Option<&UIImage>)
where Self: Sized + Message { ... }
fn selectedImage(&self) -> Option<Retained<UIImage>>
where Self: Sized + Message { ... }
fn setSelectedImage(&self, selected_image: Option<&UIImage>)
where Self: Sized + Message { ... }
fn discoverabilityTitle(&self) -> Option<Retained<NSString>>
where Self: Sized + Message { ... }
fn setDiscoverabilityTitle(&self, discoverability_title: Option<&NSString>)
where Self: Sized + Message { ... }
fn attributes(&self) -> UIMenuElementAttributes
where Self: Sized + Message { ... }
fn setAttributes(&self, attributes: UIMenuElementAttributes)
where Self: Sized + Message { ... }
fn state(&self) -> UIMenuElementState
where Self: Sized + Message { ... }
fn setState(&self, state: UIMenuElementState)
where Self: Sized + Message { ... }
fn repeatBehavior(&self) -> UIMenuElementRepeatBehavior
where Self: Sized + Message { ... }
fn setRepeatBehavior(&self, repeat_behavior: UIMenuElementRepeatBehavior)
where Self: Sized + Message { ... }
fn sender(&self) -> Option<Retained<AnyObject>>
where Self: Sized + Message { ... }
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§
Sourcefn image(&self) -> Option<Retained<UIImage>>
Available on crate feature UIImage only.
fn image(&self) -> Option<Retained<UIImage>>
UIImage only.Image that can appear next to this element.
Sourcefn selectedImage(&self) -> Option<Retained<UIImage>>
Available on crate feature UIImage only.
fn selectedImage(&self) -> Option<Retained<UIImage>>
UIImage only.Image that can appear next to this action when the state is UIMenuElementStateOn
Sourcefn setSelectedImage(&self, selected_image: Option<&UIImage>)
Available on crate feature UIImage only.
fn setSelectedImage(&self, selected_image: Option<&UIImage>)
UIImage only.Setter for selectedImage.
This is copied when set.
Sourcefn discoverabilityTitle(&self) -> Option<Retained<NSString>>
fn discoverabilityTitle(&self) -> Option<Retained<NSString>>
Elaborated title used in keyboard shortcut overlay.
Sourcefn setDiscoverabilityTitle(&self, discoverability_title: Option<&NSString>)
fn setDiscoverabilityTitle(&self, discoverability_title: Option<&NSString>)
Setter for discoverabilityTitle.
This is copied when set.
Sourcefn attributes(&self) -> UIMenuElementAttributes
Available on crate feature UIMenuElement only.
fn attributes(&self) -> UIMenuElementAttributes
UIMenuElement only.The element’s attributes.
Sourcefn setAttributes(&self, attributes: UIMenuElementAttributes)
Available on crate feature UIMenuElement only.
fn setAttributes(&self, attributes: UIMenuElementAttributes)
UIMenuElement only.Setter for attributes.
Sourcefn state(&self) -> UIMenuElementState
Available on crate feature UIMenuElement only.
fn state(&self) -> UIMenuElementState
UIMenuElement only.The element’s selection state.
Sourcefn setState(&self, state: UIMenuElementState)
Available on crate feature UIMenuElement only.
fn setState(&self, state: UIMenuElementState)
UIMenuElement only.Setter for state.
Sourcefn repeatBehavior(&self) -> UIMenuElementRepeatBehavior
Available on crate feature UIMenuElement only.
fn repeatBehavior(&self) -> UIMenuElementRepeatBehavior
UIMenuElement only.The leaf’s preferred repeat behavior. Menu leaves can repeatedly perform their primary actions on prolonged interactions, such as by holding down their keyboard shortcut.
Sourcefn setRepeatBehavior(&self, repeat_behavior: UIMenuElementRepeatBehavior)
Available on crate feature UIMenuElement only.
fn setRepeatBehavior(&self, repeat_behavior: UIMenuElementRepeatBehavior)
UIMenuElement only.Setter for repeatBehavior.
Sourcefn sender(&self) -> Option<Retained<AnyObject>>
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.
Sourcefn presentationSourceItem(
&self,
) -> Option<Retained<ProtocolObject<dyn UIPopoverPresentationControllerSourceItem>>>
Available on crate feature UIPopoverPresentationControllerSourceItem only.
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
UIAction only.impl UIMenuLeaf for UICommand
UICommand only.impl UIMenuLeaf for UIKeyCommand
UIKeyCommand only.impl UIMenuLeaf for UIWindowSceneActivationAction
UIWindowSceneActivationAction only.