]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/bmpbuttn.cpp
A little clarification
[wxWidgets.git] / src / gtk / bmpbuttn.cpp
index 4f28995d7b4729a7efda9f40287adc5c23a8028a..eeb89d7163cd565f18ed6cfa97d897bb10ba2d53 100644 (file)
@@ -7,10 +7,13 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "bmpbuttn.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #include "wx/defs.h"
 
 #if wxUSE_BMPBUTTON
@@ -109,6 +112,16 @@ static void gtk_bmpbutton_release_callback( GtkWidget *WXUNUSED(widget), wxBitma
 
 IMPLEMENT_DYNAMIC_CLASS(wxBitmapButton,wxButton)
 
+wxBitmapButtonBase::wxBitmapButtonBase()
+                                      : m_bmpNormal(), 
+                                        m_bmpSelected(), 
+                                        m_bmpFocus(), 
+                                        m_bmpDisabled(), 
+                                        m_marginX(0), 
+                                        m_marginY(0)
+{
+}
+
 void wxBitmapButton::Init()
 {
     m_hasFocus =
@@ -173,8 +186,7 @@ bool wxBitmapButton::Create( wxWindow *parent,
     m_parent->DoAddChild( this );
 
     PostCreation();
-
-    SetBackgroundColour( parent->GetBackgroundColour() );
+    InheritAttributes();
 
     Show( TRUE );