X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b466e85a7e81db84545bc44c83cbe4ccacd4fe8e..c443ff6f5350df36902af42d0193e53d79dd6a14:/src/osx/cocoa/notebook.mm diff --git a/src/osx/cocoa/notebook.mm b/src/osx/cocoa/notebook.mm index bf86c4fbdf..05bce718e8 100644 --- a/src/osx/cocoa/notebook.mm +++ b/src/osx/cocoa/notebook.mm @@ -41,11 +41,8 @@ @interface wxNSTabView : NSTabView { - WXCOCOAIMPL_COMMON_MEMBERS } -WXCOCOAIMPL_COMMON_INTERFACE - @end @implementation wxTabViewController @@ -58,11 +55,13 @@ WXCOCOAIMPL_COMMON_INTERFACE - (BOOL)tabView:(NSTabView *)tabView shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem { + wxUnusedVar(tabViewItem); wxNSTabView* view = (wxNSTabView*) tabView; - wxWidgetCocoaImpl* viewimpl = [view implementation]; + wxWidgetCocoaImpl* viewimpl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( view ); + if ( viewimpl ) { - wxNotebook* wxpeer = (wxNotebook*) viewimpl->GetWXPeer(); + // wxNotebook* wxpeer = (wxNotebook*) viewimpl->GetWXPeer(); } return YES; } @@ -70,12 +69,13 @@ WXCOCOAIMPL_COMMON_INTERFACE - (void)tabView:(NSTabView *)tabView didSelectTabViewItem:(NSTabViewItem *)tabViewItem; { + wxUnusedVar(tabViewItem); wxNSTabView* view = (wxNSTabView*) tabView; - wxWidgetCocoaImpl* viewimpl = [view implementation]; + wxWidgetCocoaImpl* viewimpl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( view ); if ( viewimpl ) { wxNotebook* wxpeer = (wxNotebook*) viewimpl->GetWXPeer(); - wxpeer->HandleClicked(0); + wxpeer->OSXHandleClicked(0); } } @@ -83,7 +83,15 @@ WXCOCOAIMPL_COMMON_INTERFACE @implementation wxNSTabView -WXCOCOAIMPL_COMMON_IMPLEMENTATION ++ (void)initialize +{ + static BOOL initialized = NO; + if (!initialized) + { + initialized = YES; + wxOSXCocoaClassAddWXMethods( self ); + } +} @end @@ -219,12 +227,12 @@ public: #endif */ wxWidgetImplType* wxWidgetImpl::CreateTabView( wxWindowMac* wxpeer, - wxWindowMac* parent, - wxWindowID id, + wxWindowMac* WXUNUSED(parent), + wxWindowID WXUNUSED(id), const wxPoint& pos, const wxSize& size, long style, - long extraStyle) + long WXUNUSED(extraStyle)) { static wxTabViewController* controller = NULL; @@ -244,7 +252,6 @@ wxWidgetImplType* wxWidgetImpl::CreateTabView( wxWindowMac* wxpeer, wxNSTabView* v = [[wxNSTabView alloc] initWithFrame:r]; [v setTabViewType:tabstyle]; wxWidgetCocoaImpl* c = new wxCocoaTabView( wxpeer, v ); - [v setImplementation:c]; [v setDelegate: controller]; return c; }