]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/notebook.mm
Border styles create a double-border on native search ctrl, just use the one Apple...
[wxWidgets.git] / src / osx / cocoa / notebook.mm
index bf86c4fbdf8f6f4dcea22f93c6a932bcf36d5dbc..36abc047db64ffafc2c02cd4a22c3c116668597d 100644 (file)
 
 @interface wxNSTabView : NSTabView
 {
 
 @interface wxNSTabView : NSTabView
 {
-    WXCOCOAIMPL_COMMON_MEMBERS
 }
 
 }
 
-WXCOCOAIMPL_COMMON_INTERFACE
-
 @end
 
 @implementation wxTabViewController
 @end
 
 @implementation wxTabViewController
@@ -59,10 +56,11 @@ WXCOCOAIMPL_COMMON_INTERFACE
 - (BOOL)tabView:(NSTabView *)tabView shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem
 {
     wxNSTabView* view = (wxNSTabView*) tabView;
 - (BOOL)tabView:(NSTabView *)tabView shouldSelectTabViewItem:(NSTabViewItem *)tabViewItem
 {
     wxNSTabView* view = (wxNSTabView*) tabView;
-    wxWidgetCocoaImpl* viewimpl = [view implementation];
+    wxWidgetCocoaImpl* viewimpl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( view );
+
     if ( viewimpl )
     {
     if ( viewimpl )
     {
-        wxNotebook* wxpeer = (wxNotebook*) viewimpl->GetWXPeer();
+        // wxNotebook* wxpeer = (wxNotebook*) viewimpl->GetWXPeer();
     }
     return YES;
 }
     }
     return YES;
 }
@@ -71,11 +69,11 @@ WXCOCOAIMPL_COMMON_INTERFACE
 
 {
     wxNSTabView* view = (wxNSTabView*) tabView;
 
 {
     wxNSTabView* view = (wxNSTabView*) tabView;
-    wxWidgetCocoaImpl* viewimpl = [view implementation];
+    wxWidgetCocoaImpl* viewimpl = (wxWidgetCocoaImpl* ) wxWidgetImpl::FindFromWXWidget( view );
     if ( viewimpl )
     {
         wxNotebook* wxpeer = (wxNotebook*) viewimpl->GetWXPeer();
     if ( viewimpl )
     {
         wxNotebook* wxpeer = (wxNotebook*) viewimpl->GetWXPeer();
-        wxpeer->HandleClicked(0);
+        wxpeer->OSXHandleClicked(0);
     }
 }
 
     }
 }
 
@@ -83,7 +81,15 @@ WXCOCOAIMPL_COMMON_INTERFACE
 
 @implementation wxNSTabView
 
 
 @implementation wxNSTabView
 
-WXCOCOAIMPL_COMMON_IMPLEMENTATION
++ (void)initialize
+{
+    static BOOL initialized = NO;
+    if (!initialized) 
+    {
+        initialized = YES;
+        wxOSXCocoaClassAddWXMethods( self );
+    }
+}
 
 @end
 
 
 @end
 
@@ -244,7 +250,6 @@ wxWidgetImplType* wxWidgetImpl::CreateTabView( wxWindowMac* wxpeer,
     wxNSTabView* v = [[wxNSTabView alloc] initWithFrame:r];
     [v setTabViewType:tabstyle];
     wxWidgetCocoaImpl* c = new wxCocoaTabView( wxpeer, v );
     wxNSTabView* v = [[wxNSTabView alloc] initWithFrame:r];
     [v setTabViewType:tabstyle];
     wxWidgetCocoaImpl* c = new wxCocoaTabView( wxpeer, v );
-    [v setImplementation:c];
     [v setDelegate: controller];
     return c;
 }
     [v setDelegate: controller];
     return c;
 }