X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/94a2af76726bde98e76f4417d33e91f10aea1771..9d5507f7a2701395e1d5c121bd877bb9066ee6ea:/src/cocoa/notebook.mm?ds=sidebyside diff --git a/src/cocoa/notebook.mm b/src/cocoa/notebook.mm index a4f535f2b8..10e04d98e7 100644 --- a/src/cocoa/notebook.mm +++ b/src/cocoa/notebook.mm @@ -21,6 +21,7 @@ #include "wx/cocoa/autorelease.h" #include "wx/cocoa/string.h" +#include "wx/cocoa/objc/objc_uniquifying.h" #import #import @@ -48,6 +49,7 @@ - (NSImage*)image; - (void)setImage:(NSImage*)image; @end // interface WXCTabViewImageItem : NSTabViewItem +WX_DECLARE_GET_OBJC_CLASS(WXCTabViewImageItem,NSTabViewItem) @implementation WXCTabViewImageItem : NSTabViewItem - (id)init @@ -120,6 +122,7 @@ } @end // implementation WXCTabViewImageItem : NSTabViewItem +WX_IMPLEMENT_GET_OBJC_CLASS(WXCTabViewImageItem,NSTabViewItem) // ======================================================================== // wxNotebookEvent @@ -218,7 +221,7 @@ bool wxNotebook::InsertPage( size_t pos, { wxAutoNSAutoreleasePool pool; m_pages.Insert(page,pos); - NSTabViewItem *tvitem = [[WXCTabViewImageItem alloc] initWithIdentifier:nil]; + NSTabViewItem *tvitem = [[WX_GET_OBJC_CLASS(WXCTabViewImageItem) alloc] initWithIdentifier:nil]; [tvitem setLabel: wxNSStringWithWxString(title)]; const wxBitmap *bmp = (imageId!=-1)?m_imageList->GetBitmapPtr(imageId):NULL; if(bmp) @@ -322,7 +325,7 @@ bool wxNotebook::CocoaDelegate_tabView_shouldSelectTabViewItem(WX_NSTabViewItem wxNotebookEvent event(wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGING, GetId(), [GetNSTabView() indexOfTabViewItem:tabViewItem], GetSelection()); event.SetEventObject(this); - return !GetEventHandler()->ProcessEvent(event) || event.IsAllowed(); + return !HandleWindowEvent(event) || event.IsAllowed(); } #endif // wxUSE_NOTEBOOK