Skip to main content

NSAlertDelegate

Trait NSAlertDelegate 

Source
pub unsafe trait NSAlertDelegate: NSObjectProtocol + MainThreadOnly {
    // Provided method
    fn alertShowHelp(&self, alert: &NSAlert) -> bool
       where Self: Sized + Message { ... }
}
Available on crate feature NSAlert only.
Expand description

A set of optional methods implemented by the delegate of an NSAlert object to respond to a user’s request for help.

See also Apple’s documentation

Provided Methods§

Source

fn alertShowHelp(&self, alert: &NSAlert) -> bool
where Self: Sized + Message,

Sent to the delegate when the user clicks the alert’s help button. The delegate causes help to be displayed for an alert, directly or indirectly.

  • Returns: YES when the delegate displayed help directly, NO otherwise. When NO and the alert has a help anchor (helpAnchor), the application’s help manager displays help using the help anchor.
  • Discussion: The delegate implements this method only to override the help-anchor lookup behavior.

Trait Implementations§

Source§

impl<T> ImplementedBy<T> for dyn NSAlertDelegate

Source§

impl ProtocolType for dyn NSAlertDelegate

Source§

const NAME: &'static str = "NSAlertDelegate"

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

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementations on Foreign Types§

Source§

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

Implementors§