]> git.saurik.com Git - wxWidgets.git/blobdiff - src/mac/classic/choice.cpp
Mac compilation fix after const patch
[wxWidgets.git] / src / mac / classic / choice.cpp
index 62b1685ca247511d65f78142cad47f1adf5ff9e5..f3d6144b6799b4674a6b70e4978e60a570b0407d 100644 (file)
@@ -6,21 +6,18 @@
 // Created:     1998-01-01
 // RCS-ID:      $Id$
 // Copyright:   (c) Stefan Csomor
-// Licence:       wxWidgets licence
+// Licence:       wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
-#pragma implementation "choice.h"
-#endif
-
 #include "wx/defs.h"
+
+#if wxUSE_CHOICE
+
 #include "wx/choice.h"
 #include "wx/menu.h"
 #include "wx/mac/uma.h"
 
-#if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxChoice, wxControl)
-#endif
 
 extern MenuHandle NewUniqueMenu() ;
 
@@ -67,7 +64,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
     Str255 title ;
 
     MacPreControlCreate( parent , id ,  wxEmptyString , pos , size ,style, validator , name , &bounds , title ) ;
-    m_macControl = ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , -12345 , 0 ,
+    m_macControl = (WXWidget) ::NewControl( MAC_WXHWND(parent->MacGetRootWindow()) , &bounds , title , false , 0 , -12345 , 0 ,
         kControlPopupButtonProc + kControlPopupFixedWidthVariant , (long) this ) ;
 
     m_macPopUpMenuHandle =  NewUniqueMenu() ;
@@ -82,7 +79,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
     {
         Append(choices[i]);
     }
-    return TRUE;
+    return true;
 }
 
 // ----------------------------------------------------------------------------
@@ -178,7 +175,7 @@ int wxChoice::FindString(const wxString& s) const
 {
     for( int i = 0 ; i < GetCount() ; i++ )
     {
-        if ( GetString( i ).IsSameAs(s, FALSE) )
+        if ( GetString( i ).IsSameAs(s, false) )
             return i ;
     }
     return wxNOT_FOUND ;
@@ -229,7 +226,7 @@ wxClientData* wxChoice::DoGetItemClientObject( int n ) const
     return (wxClientData *)DoGetItemClientData(n);
 }
 
-void wxChoice::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool WXUNUSED(mouseStillDown)) 
+void wxChoice::MacHandleControlClick( WXWidget control , wxInt16 controlpart , bool WXUNUSED(mouseStillDown))
 {
     wxCommandEvent event(wxEVT_COMMAND_CHOICE_SELECTED, m_windowId );
     int n = GetSelection();
@@ -298,3 +295,5 @@ wxSize wxChoice::DoGetBestSize() const
     }
     return wxSize(lbWidth, lbHeight);
 }
+
+#endif // wxUSE_CHOICE