]> git.saurik.com Git - wxWidgets.git/blobdiff - src/os2/button.cpp
fixed xpm colour parsing bug due to case sensitive colour name comparison
[wxWidgets.git] / src / os2 / button.cpp
index 8650e1002699470374e1a205830c822705038ce5..cecadf63eed7905f6d846c068c84aadda6b33b03 100644 (file)
 
 #include "wx/os2/private.h"
 
-#if !USE_SHARED_LIBRARY
 IMPLEMENT_DYNAMIC_CLASS(wxButton, wxControl)
-#endif
 
 // Button
 
 bool wxButton::Create(wxWindow *parent, wxWindowID id, const wxString& label,
            const wxPoint& pos,
            const wxSize& size, long style,
+#if wxUSE_VALIDATORS
            const wxValidator& validator,
+#endif
            const wxString& name)
 {
     SetName(name);
+#if wxUSE_VALIDATORS
     SetValidator(validator);
+#endif
     m_windowStyle = style;
 
     parent->AddChild((wxButton *)this);
@@ -68,14 +70,14 @@ wxButton::~wxButton()
 // size management including autosizing
 // ----------------------------------------------------------------------------
 
-wxSize wxButton::DoGetBestSize()
+wxSize wxButton::DoGetBestSize() const
 {
     wxString label = wxGetWindowText(GetHWND());
     int wBtn;
     GetTextExtent(label, &wBtn, NULL);
 
     int wChar, hChar;
-    wxGetCharSize(GetHWND(), &wChar, &hChar, &GetFont());
+    wxGetCharSize(GetHWND(), &wChar, &hChar, (wxFont*)&GetFont());
 
     // add a margin - the button is wider than just its label
     wBtn += 3*wChar;