UIMenuLeaf

Trait UIMenuLeaf 

Source
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 { ... }
}
Available on crate feature UIMenuLeaf only.
Expand description

Provided Methods§

Source

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

Short display title.

Source

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

Setter for title.

This is copied when set.

Source

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

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

Available on crate feature UIImage only.

Setter for image.

This is copied when set.

Source

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

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

Available on crate feature UIImage only.

Setter for selectedImage.

This is copied when set.

Source

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

Elaborated title used in keyboard shortcut overlay.

Source

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

Setter for discoverabilityTitle.

This is copied when set.

Source

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

Available on crate feature UIMenuElement only.

The element’s attributes.

Source

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

Available on crate feature UIMenuElement only.

Setter for attributes.

Source

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

Available on crate feature UIMenuElement only.

The element’s selection state.

Source

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

Available on crate feature UIMenuElement only.

Setter for state.

Source

fn repeatBehavior(&self) -> UIMenuElementRepeatBehavior
where Self: Sized + Message,

Available on crate feature 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.

Source

fn setRepeatBehavior(&self, repeat_behavior: UIMenuElementRepeatBehavior)
where Self: Sized + Message,

Available on crate feature UIMenuElement only.

Setter for repeatBehavior.

Source

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

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).

§Safety
  • sender should be of the correct type.
  • target should be of the correct type.

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 feature UIAction only.
Source§

impl UIMenuLeaf for UICommand

Available on crate feature UICommand only.
Source§

impl UIMenuLeaf for UIKeyCommand

Available on crate feature UIKeyCommand only.
Source§

impl UIMenuLeaf for UIWindowSceneActivationAction

Available on crate feature UIWindowSceneActivationAction only.