class WXDLLEXPORT wxMenuBar;
+DECLARE_WXCOCOA_OBJC_CLASS(NSMenuItem);
DECLARE_WXCOCOA_OBJC_CLASS(wxNSWindowDelegate);
class wxCocoaNSWindow
virtual void CocoaDelegate_windowDidResignKey(void) { }
virtual void CocoaDelegate_windowDidBecomeMain(void) { }
virtual void CocoaDelegate_windowDidResignMain(void) { }
- virtual void CocoaDelegate_wxMenuItemAction(struct objc_object *sender) = 0;
- virtual bool CocoaDelegate_validateMenuItem(struct objc_object *sender) = 0;
+ virtual void CocoaDelegate_wxMenuItemAction(WX_NSMenuItem menuItem) = 0;
+ virtual bool CocoaDelegate_validateMenuItem(WX_NSMenuItem menuItem) = 0;
virtual wxMenuBar* GetAppMenuBar(wxCocoaNSWindow *win);
protected:
wxCocoaNSWindow();
virtual void CocoaDelegate_windowDidResignKey(void);
virtual void CocoaDelegate_windowDidBecomeMain(void);
virtual void CocoaDelegate_windowDidResignMain(void);
- virtual void CocoaDelegate_wxMenuItemAction(struct objc_object *sender);
- virtual bool CocoaDelegate_validateMenuItem(struct objc_object *sender);
+ virtual void CocoaDelegate_wxMenuItemAction(WX_NSMenuItem sender);
+ virtual bool CocoaDelegate_validateMenuItem(WX_NSMenuItem sender);
virtual wxMenuBar* GetAppMenuBar(wxCocoaNSWindow *win);
static void DeactivatePendingWindow();
protected:
- (void)windowWillClose: (NSNotification *)notification;
// Menu item handlers
-- (void)wxMenuItemAction: (id)sender;
-- (BOOL)validateMenuItem: (id)menuItem;
+- (void)wxMenuItemAction: (NSMenuItem *)menuItem;
+- (BOOL)validateMenuItem: (NSMenuItem *)menuItem;
@end //interface wxNSWindowDelegate
@implementation wxNSWindowDelegate : NSObject
}
// Menu item handlers
-- (void)wxMenuItemAction: (id)sender
+- (void)wxMenuItemAction: (NSMenuItem *)sender
{
wxASSERT(m_wxCocoaInterface);
m_wxCocoaInterface->CocoaDelegate_wxMenuItemAction(sender);
}
-- (BOOL)validateMenuItem: (id)sender
+- (BOOL)validateMenuItem: (NSMenuItem *)sender
{
wxASSERT(m_wxCocoaInterface);
return m_wxCocoaInterface->CocoaDelegate_validateMenuItem(sender);
return wxWindowBase::Close(false);
}
-void wxTopLevelWindowCocoa::CocoaDelegate_wxMenuItemAction(struct objc_object *sender)
+void wxTopLevelWindowCocoa::CocoaDelegate_wxMenuItemAction(WX_NSMenuItem menuItem)
{
}
-bool wxTopLevelWindowCocoa::CocoaDelegate_validateMenuItem(struct objc_object *sender)
+bool wxTopLevelWindowCocoa::CocoaDelegate_validateMenuItem(WX_NSMenuItem menuItem)
{
return false;
}