]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/bmpbuttn.cpp
Fix incorrect event handler functions casts in wxRibbonPanel code.
[wxWidgets.git] / src / gtk / bmpbuttn.cpp
index 5dcd0493942af50f0dba0dd31c24283343537108..cf429bd2fe9c3ab7468e96378e19d2141a5ab462 100644 (file)
@@ -2,7 +2,6 @@
 // Name:        src/gtk/bmpbuttn.cpp
 // Purpose:
 // Author:      Robert Roebling
-// Id:          $Id$
 // Copyright:   (c) 1998 Robert Roebling
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #include "wx/bmpbuttn.h"
 
-IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton,wxButton)
+bool wxBitmapButton::Create(wxWindow *parent,
+                            wxWindowID id,
+                            const wxBitmap& bitmap,
+                            const wxPoint& pos,
+                            const wxSize& size,
+                            long style,
+                            const wxValidator& validator,
+                            const wxString& name)
+{
+    if ( !wxBitmapButtonBase::Create(parent, id, pos, size, style,
+                                     validator, name) )
+        return false;
 
+    if ( bitmap.IsOk() )
+    {
+        SetBitmapLabel(bitmap);
+
+        // we need to adjust the size after setting the bitmap as it may be too
+        // big for the default button size
+        SetInitialSize(size);
+    }
+
+    return true;
+}
 #endif // wxUSE_BMPBUTTON