X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc374a2f2985d8783e13063a7db33c1062ca35c4..6d7b547184bfdcdf67790755deb0122050b1d728:/src/mac/carbon/bmpbuttn.cpp diff --git a/src/mac/carbon/bmpbuttn.cpp b/src/mac/carbon/bmpbuttn.cpp index 48fec8aac6..f6badadfeb 100644 --- a/src/mac/carbon/bmpbuttn.cpp +++ b/src/mac/carbon/bmpbuttn.cpp @@ -6,28 +6,31 @@ // Created: 1998-01-01 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" #if wxUSE_BMPBUTTON -#include "wx/window.h" #include "wx/bmpbuttn.h" +#ifndef WX_PRECOMP + #include "wx/window.h" + #include "wx/bitmap.h" +#endif + IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton, wxButton) #include "wx/mac/uma.h" -#include "wx/bitmap.h" bool wxBitmapButton::Create( wxWindow *parent, - wxWindowID id, const wxBitmap& bitmap, - const wxPoint& pos, - const wxSize& size, - long style, - const wxValidator& validator, - const wxString& name ) + wxWindowID id, const wxBitmap& bitmap, + const wxPoint& pos, + const wxSize& size, + long style, + const wxValidator& validator, + const wxString& name ) { m_macIsUserPane = false; @@ -55,9 +58,9 @@ bool wxBitmapButton::Create( wxWindow *parent, if ( bitmap.Ok() ) { wxSize newSize = DoGetBestSize(); - if ( width == -1 ) + if ( width == wxDefaultCoord ) width = newSize.x; - if ( height == -1 ) + if ( height == wxDefaultCoord ) height = newSize.y; }