Make wxMenuItemAction: and validateMenuItem: delegate messages take an
NSWindow* parameter instead of an id. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@25977 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -19,6 +19,7 @@ WX_DECLARE_OBJC_HASHMAP(NSWindow);
|
||||
|
||||
class WXDLLEXPORT wxMenuBar;
|
||||
|
||||
DECLARE_WXCOCOA_OBJC_CLASS(NSMenuItem);
|
||||
DECLARE_WXCOCOA_OBJC_CLASS(wxNSWindowDelegate);
|
||||
|
||||
class wxCocoaNSWindow
|
||||
@@ -36,8 +37,8 @@ public:
|
||||
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();
|
||||
|
@@ -67,8 +67,8 @@ public:
|
||||
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:
|
||||
|
@@ -51,8 +51,8 @@
|
||||
- (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
|
||||
@@ -129,13 +129,13 @@
|
||||
}
|
||||
|
||||
// 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);
|
||||
|
@@ -232,11 +232,11 @@ bool wxTopLevelWindowCocoa::CocoaDelegate_windowShouldClose()
|
||||
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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user