]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/button.mm
use correct value for MTU - sizeof(TCP header)
[wxWidgets.git] / src / osx / cocoa / button.mm
index ec396993247ea9a991e6e718f16e77b925a43feb..ffe3c6e3974622cbd6c875b8db0d740cc8ae13c0 100644 (file)
@@ -132,6 +132,8 @@ wxSize wxButton::GetDefaultSize()
     return self;
 }
 
+WXCOCOAIMPL_COMMON_IMPLEMENTATION
+
 - (void) clickedAction: (id) sender
 {
     if ( impl )
@@ -142,21 +144,6 @@ wxSize wxButton::GetDefaultSize()
     }
 }
 
-- (void)setImplementation: (wxWidgetImpl *) theImplementation
-{
-    impl = theImplementation;
-}
-
-- (wxWidgetImpl*) implementation
-{
-    return impl;
-}
-
-- (BOOL) isFlipped
-{
-    return YES;
-}
-
 - (int) intValue
 {
     switch ( [self state] )
@@ -198,8 +185,6 @@ wxWidgetImplType* wxWidgetImpl::CreateButton( wxWindowMac* wxpeer,
                                     long style, 
                                     long extraStyle) 
 {
-    NSView* sv = (wxpeer->GetParent()->GetHandle() );
-    
     NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
     wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
     
@@ -213,7 +198,6 @@ wxWidgetImplType* wxWidgetImpl::CreateButton( wxWindowMac* wxpeer,
     }
     
     [v setButtonType:NSMomentaryPushInButton];
-    [sv addSubview:v];
     wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
     [v setImplementation:c];
     return c;
@@ -287,15 +271,12 @@ wxWidgetImplType* wxWidgetImpl::CreateDisclosureTriangle( wxWindowMac* wxpeer,
                                     long style, 
                                     long extraStyle) 
 {
-    NSView* sv = (wxpeer->GetParent()->GetHandle() );
-    
     NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
     wxNSButton* v = [[wxNSButton alloc] initWithFrame:r];
     [v setBezelStyle:NSDisclosureBezelStyle];
     [v setButtonType:NSOnOffButton];
     [v setTitle:wxCFStringRef( label).AsNSString()];
     [v setImagePosition:NSImageRight];
-    [sv addSubview:v];
     wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
     [v setImplementation:c];
     return c;