Add Objective-C uniquifying to WXNSWindow and WXNSPanel
Copyright 2007 Software 2000 Ltd. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@47988 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
fe8402e653
commit
dc834029a3
@ -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)
|
||||
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user