#import <AppKit/NSWindow.h>
#import <AppKit/NSPanel.h>
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
// ============================================================================
// @class WXNSWindow
// ============================================================================
- (BOOL)canBecomeKeyWindow;
- (BOOL)canBecomeMainWindow;
@end // WXNSWindow
+WX_DECLARE_GET_OBJC_CLASS(WXNSWindow,NSWindow)
// ============================================================================
// @class WXNSPanel
- (BOOL)canBecomeKeyWindow;
- (BOOL)canBecomeMainWindow;
@end // WXNSPanel
+WX_DECLARE_GET_OBJC_CLASS(WXNSPanel,NSPanel)
}
@end // implementation WXNSWindow
+WX_IMPLEMENT_GET_OBJC_CLASS(WXNSWindow,NSWindow)
// ============================================================================
// @class WXNSPanel
}
@end // implementation WXNSPanel
+WX_IMPLEMENT_GET_OBJC_CLASS(WXNSPanel,NSPanel)
NSWindow *newWindow;
// Create a WXNSPanel or a WXNSWindow depending on what type of window is desired.
if(style & wxFRAME_TOOL_WINDOW)
- newWindow = [[WXNSPanel alloc] initWithContentRect:cocoaRect styleMask:cocoaStyle backing:NSBackingStoreBuffered defer:NO];
+ newWindow = [[WX_GET_OBJC_CLASS(WXNSPanel) alloc] initWithContentRect:cocoaRect styleMask:cocoaStyle backing:NSBackingStoreBuffered defer:NO];
else
- newWindow = [[WXNSWindow alloc] initWithContentRect:cocoaRect styleMask:cocoaStyle backing:NSBackingStoreBuffered defer:NO];
+ newWindow = [[WX_GET_OBJC_CLASS(WXNSWindow) alloc] initWithContentRect:cocoaRect styleMask:cocoaStyle backing:NSBackingStoreBuffered defer:NO];
// Make sure the default content view is a WXNSView
[newWindow setContentView: [[WX_GET_OBJC_CLASS(WXNSView) alloc] initWithFrame: [[newWindow contentView] frame]]];
// Associate the window and view