+ wxCHECK_RET( m_widget != NULL, _T("invalid button") );
+
+ wxControl::SetLabel( label );
+}
+
+wxString wxBitmapButton::GetLabel() const
+{
+ wxCHECK_MSG( m_widget != NULL, _T(""), _T("invalid button") );
+
+ return wxControl::GetLabel();
+}
+
+void wxBitmapButton::ApplyWidgetStyle()
+{
+}
+
+void wxBitmapButton::SetBitmap()
+{
+ wxCHECK_RET( m_widget != NULL, _T("invalid button") );
+
+ wxBitmap the_one;
+
+ if (!m_isEnabled)
+ the_one = m_disabled;
+ else
+ {
+ if (m_isSelected)
+ {
+ the_one = m_selected;
+ }
+ else
+ {
+ if (m_hasFocus)
+ the_one = m_focus;
+ else
+ the_one = m_bitmap;
+ }
+ }
+
+ if (!the_one.Ok()) the_one = m_bitmap;
+ if (!the_one.Ok()) return;
+
+ GtkButton *bin = GTK_BUTTON( m_widget );
+ GtkPixmap *g_pixmap = GTK_PIXMAP( bin->child );
+
+ GdkBitmap *mask = (GdkBitmap *) NULL;
+ if (the_one.GetMask()) mask = the_one.GetMask()->GetBitmap();
+
+ gtk_pixmap_set( g_pixmap, the_one.GetPixmap(), mask );
+}
+
+void wxBitmapButton::SetBitmapDisabled( const wxBitmap& bitmap )
+{
+ wxCHECK_RET( m_widget != NULL, _T("invalid button") );
+
+ if ( ! m_disabled.Ok() ) return;
+ m_disabled = bitmap;
+
+ SetBitmap();
+}