X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2646f485163f410baaad5bcf49028c604a352d19..759f72726133ce3bdbe1c3a2f444aa816c7f46c9:/src/mac/classic/choice.cpp?ds=sidebyside diff --git a/src/mac/classic/choice.cpp b/src/mac/classic/choice.cpp index 9f8494db9a..f08d6b8a0d 100644 --- a/src/mac/classic/choice.cpp +++ b/src/mac/classic/choice.cpp @@ -14,6 +14,9 @@ #endif #include "wx/defs.h" + +#if wxUSE_CHOICE + #include "wx/choice.h" #include "wx/menu.h" #include "wx/mac/uma.h" @@ -67,7 +70,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 +85,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id, { Append(choices[i]); } - return TRUE; + return true; } // ---------------------------------------------------------------------------- @@ -178,7 +181,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 +232,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 +301,5 @@ wxSize wxChoice::DoGetBestSize() const } return wxSize(lbWidth, lbHeight); } + +#endif // wxUSE_CHOICE