]> git.saurik.com Git - wxWidgets.git/commitdiff
Add Objective-C uniquifying to WXNSWindow and WXNSPanel
authorDavid Elliott <dfe@tgwbd.org>
Thu, 9 Aug 2007 18:15:50 +0000 (18:15 +0000)
committerDavid Elliott <dfe@tgwbd.org>
Thu, 9 Aug 2007 18:15:50 +0000 (18:15 +0000)
Copyright 2007 Software 2000 Ltd.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/cocoa/objc/NSWindow.h
src/cocoa/NSWindow.mm
src/cocoa/toplevel.mm

index 56ba3e151b133f2feb2a4d30485e00c874184c50..b5d73b16a196c81dd480dd90cdd08db2d0178a4e 100644 (file)
@@ -12,6 +12,8 @@
 #import <AppKit/NSWindow.h>
 #import <AppKit/NSPanel.h>
 
+#include "wx/cocoa/objc/objc_uniquifying.h"
+
 // ============================================================================
 // @class WXNSWindow
 // ============================================================================
@@ -22,6 +24,7 @@
 - (BOOL)canBecomeKeyWindow;
 - (BOOL)canBecomeMainWindow;
 @end // WXNSWindow
+WX_DECLARE_GET_OBJC_CLASS(WXNSWindow,NSWindow)
 
 // ============================================================================
 // @class WXNSPanel
@@ -33,4 +36,5 @@
 - (BOOL)canBecomeKeyWindow;
 - (BOOL)canBecomeMainWindow;
 @end // WXNSPanel
+WX_DECLARE_GET_OBJC_CLASS(WXNSPanel,NSPanel)
 
index 7152f6c47bb982560b1749ad1c1d7b515d3bd248..a9e3f7b58d3c5de1a43605645d0208afe013647c 100644 (file)
@@ -209,6 +209,7 @@ wxMenuBar* wxCocoaNSWindow::GetAppMenuBar(wxCocoaNSWindow *win)
 }
 
 @end // implementation WXNSWindow
+WX_IMPLEMENT_GET_OBJC_CLASS(WXNSWindow,NSWindow)
 
 // ============================================================================
 // @class WXNSPanel
@@ -234,3 +235,4 @@ wxMenuBar* wxCocoaNSWindow::GetAppMenuBar(wxCocoaNSWindow *win)
 }
 
 @end // implementation WXNSPanel
+WX_IMPLEMENT_GET_OBJC_CLASS(WXNSPanel,NSPanel)
index f2e44d4b44e36da529cded0376d5552409f5dbbd..2567dcc06ac3c8b3c7df90a65735a9bb89d55ae8 100644 (file)
@@ -138,9 +138,9 @@ bool wxTopLevelWindowCocoa::Create(wxWindow *parent,
     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