#include "wx/cocoa/mbarman.h"
#include "wx/cocoa/autorelease.h"
+#include "wx/cocoa/objc/objc_uniquifying.h"
#import <Foundation/NSString.h>
#import <Foundation/NSNotification.h>
#import <AppKit/NSApplication.h>
#import <AppKit/NSWindow.h>
+// Declare setAppleMenu: in an NSApplication category since Tiger and later
+// releases support it but don't declare it as it's considered deprecated.
+@interface NSApplication(wxDeprecatedMethodsWeWantToUse)
+- (void)setAppleMenu:(NSMenu *)menu;
+@end
+
// ============================================================================
// wxMenuBarManagerObserver
// ============================================================================
- (void)windowWillClose: (NSNotification *)notification;
#endif // 0
@end // interface wxMenuBarManagerObserver : NSObject
+WX_DECLARE_GET_OBJC_CLASS(wxMenuBarManagerObserver,NSObject)
@implementation wxMenuBarManagerObserver : NSObject
- (id)init
#endif // 0
@end // implementation wxMenuBarManagerObserver : NSObject
+WX_IMPLEMENT_GET_OBJC_CLASS(wxMenuBarManagerObserver,NSObject)
// ============================================================================
// wxMenuBarManager
wxMenuBarManager::wxMenuBarManager()
{
- m_observer = [[wxMenuBarManagerObserver alloc]
+ m_observer = [[WX_GET_OBJC_CLASS(wxMenuBarManagerObserver) alloc]
initWithWxMenuBarManager:this];
[[NSNotificationCenter defaultCenter] addObserver:m_observer
selector:@selector(windowDidBecomeKey:)