Trait objc2_app_kit::NSMenuDelegate

source ·
pub unsafe trait NSMenuDelegate: NSObjectProtocol + IsMainThreadOnly {
    // Provided methods
    unsafe fn menuNeedsUpdate(&self, menu: &NSMenu)
       where Self: Sized + Message { ... }
    unsafe fn numberOfItemsInMenu(&self, menu: &NSMenu) -> NSInteger
       where Self: Sized + Message { ... }
    unsafe fn menu_updateItem_atIndex_shouldCancel(
        &self,
        menu: &NSMenu,
        item: &NSMenuItem,
        index: NSInteger,
        should_cancel: bool
    ) -> bool
       where Self: Sized + Message { ... }
    unsafe fn menuWillOpen(&self, menu: &NSMenu)
       where Self: Sized + Message { ... }
    unsafe fn menuDidClose(&self, menu: &NSMenu)
       where Self: Sized + Message { ... }
    unsafe fn menu_willHighlightItem(
        &self,
        menu: &NSMenu,
        item: Option<&NSMenuItem>
    )
       where Self: Sized + Message { ... }
    unsafe fn confinementRectForMenu_onScreen(
        &self,
        menu: &NSMenu,
        screen: Option<&NSScreen>
    ) -> NSRect
       where Self: Sized + Message { ... }
}
Available on crate feature NSMenu only.

Provided Methods§

source

unsafe fn menuNeedsUpdate(&self, menu: &NSMenu)
where Self: Sized + Message,

source

unsafe fn numberOfItemsInMenu(&self, menu: &NSMenu) -> NSInteger
where Self: Sized + Message,

source

unsafe fn menu_updateItem_atIndex_shouldCancel( &self, menu: &NSMenu, item: &NSMenuItem, index: NSInteger, should_cancel: bool ) -> bool
where Self: Sized + Message,

Available on crate feature NSMenuItem only.
source

unsafe fn menuWillOpen(&self, menu: &NSMenu)
where Self: Sized + Message,

source

unsafe fn menuDidClose(&self, menu: &NSMenu)
where Self: Sized + Message,

source

unsafe fn menu_willHighlightItem( &self, menu: &NSMenu, item: Option<&NSMenuItem> )
where Self: Sized + Message,

Available on crate feature NSMenuItem only.
source

unsafe fn confinementRectForMenu_onScreen( &self, menu: &NSMenu, screen: Option<&NSScreen> ) -> NSRect
where Self: Sized + Message,

Available on crate feature NSScreen only.

Trait Implementations§

source§

impl ProtocolType for dyn NSMenuDelegate

source§

const NAME: &'static str = "NSMenuDelegate"

The name of the Objective-C protocol that this type represents.
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 NSMenuDelegate

Implementations on Foreign Types§

source§

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

Implementors§