]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/cocoa/choice.mm
define MIIM_BITMAP &c in wx/msw/missing.h instead of msw/menu.cpp as menuitem.cpp...
[wxWidgets.git] / src / osx / cocoa / choice.mm
index 50d1bac3321a4a0332edeefb52e9afe9c45b4553..5ebf6a244537ed94f484afa0b27a78158cb54ec2 100644 (file)
 
 @interface wxNSPopUpButton : NSPopUpButton
 {
-    wxWidgetImpl* impl;
+    WXCOCOAIMPL_COMMON_MEMBERS
 }
 
-- (void)setImplementation: (wxWidgetImpl *) theImplementation;
-- (wxWidgetImpl*) implementation;
-- (BOOL) isFlipped;
+WXCOCOAIMPL_COMMON_INTERFACE
+
 - (void) clickedAction: (id) sender;
 
 @end
     {
         wxWindow* wxpeer = (wxWindow*) impl->GetWXPeer();
         if ( wxpeer )
-            wxpeer->HandleClicked(0);
+            wxpeer->OSXHandleClicked(0);
     }
 }
 
-- (void)setImplementation: (wxWidgetImpl *) theImplementation
-{
-    impl = theImplementation;
-}
-
-- (wxWidgetImpl*) implementation
-{
-    return impl;
-}
-
-- (BOOL) isFlipped
-{
-    return YES;
-}
+WXCOCOAIMPL_COMMON_IMPLEMENTATION
 
 - (int) intValue
 {
@@ -91,11 +77,8 @@ wxWidgetImplType* wxWidgetImpl::CreateChoice( wxWindowMac* wxpeer,
                                     long style, 
                                     long extraStylew)
 {
-    NSView* sv = (wxpeer->GetParent()->GetHandle() );
-    
     NSRect r = wxOSXGetFrameForControl( wxpeer, pos , size ) ;
     wxNSPopUpButton* v = [[wxNSPopUpButton alloc] initWithFrame:r pullsDown:NO];
-    [sv addSubview:v];
     [v setMenu: menu->GetHMenu()];
     wxWidgetCocoaImpl* c = new wxWidgetCocoaImpl( wxpeer, v );
     [v setImplementation:c];