]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/bmpbuttn.cpp
added our own implementation of strto[u]ll() if the system doesn't have one (patch...
[wxWidgets.git] / src / gtk / bmpbuttn.cpp
index 5f1cacba5531f8696c9123470fd25c2542469b31..6a02c24538040d05d36c283c38f87d1eeab54457 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        gtk/bmpbuttn.cpp
+// Name:        src/gtk/bmpbuttn.cpp
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
 // Purpose:
 // Author:      Robert Roebling
 // Id:          $Id$
@@ -10,8 +10,6 @@
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
 // For compilers that support precompilation, includes "wx.h".
 #include "wx/wxprec.h"
 
-#include "wx/defs.h"
-
 #if wxUSE_BMPBUTTON
 
 #include "wx/bmpbuttn.h"
 #if wxUSE_BMPBUTTON
 
 #include "wx/bmpbuttn.h"
 
 class wxBitmapButton;
 
 
 class wxBitmapButton;
 
-//-----------------------------------------------------------------------------
-// idle system
-//-----------------------------------------------------------------------------
-
-extern void wxapp_install_idle_handler();
-extern bool g_isIdle;
-
 //-----------------------------------------------------------------------------
 // data
 //-----------------------------------------------------------------------------
 //-----------------------------------------------------------------------------
 // data
 //-----------------------------------------------------------------------------
@@ -134,7 +125,6 @@ bool wxBitmapButton::Create( wxWindow *parent,
                              const wxString &name )
 {
     m_needParent = true;
                              const wxString &name )
 {
     m_needParent = true;
-    m_acceptsFocus = true;
 
     if (!PreCreation( parent, pos, size ) ||
         !CreateBase( parent, id, pos, size, style, validator, name ))
 
     if (!PreCreation( parent, pos, size ) ||
         !CreateBase( parent, id, pos, size, style, validator, name ))
@@ -175,14 +165,6 @@ bool wxBitmapButton::Create( wxWindow *parent,
     return true;
 }
 
     return true;
 }
 
-void wxBitmapButton::SetDefault()
-{
-    GTK_WIDGET_SET_FLAGS( m_widget, GTK_CAN_DEFAULT );
-    gtk_widget_grab_default( m_widget );
-
-    SetSize( m_x, m_y, m_width, m_height );
-}
-
 void wxBitmapButton::SetLabel( const wxString &label )
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid button") );
 void wxBitmapButton::SetLabel( const wxString &label )
 {
     wxCHECK_RET( m_widget != NULL, wxT("invalid button") );
@@ -192,7 +174,7 @@ void wxBitmapButton::SetLabel( const wxString &label )
 
 void wxBitmapButton::DoApplyWidgetStyle(GtkRcStyle *style)
 {
 
 void wxBitmapButton::DoApplyWidgetStyle(GtkRcStyle *style)
 {
-    if ( !BUTTON_CHILD(m_widget) )
+    if (!GTK_BIN(m_widget)->child)
         return;
 
     wxButton::DoApplyWidgetStyle(style);
         return;
 
     wxButton::DoApplyWidgetStyle(style);
@@ -205,7 +187,7 @@ void wxBitmapButton::OnSetBitmap()
     InvalidateBestSize();
 
     wxBitmap the_one;
     InvalidateBestSize();
 
     wxBitmap the_one;
-    if (!m_isEnabled)
+    if (!IsThisEnabled())
         the_one = m_bmpDisabled;
     else if (m_isSelected)
         the_one = m_bmpSelected;
         the_one = m_bmpDisabled;
     else if (m_isSelected)
         the_one = m_bmpSelected;
@@ -220,7 +202,7 @@ void wxBitmapButton::OnSetBitmap()
     GdkBitmap *mask = (GdkBitmap *) NULL;
     if (the_one.GetMask()) mask = the_one.GetMask()->GetBitmap();
 
     GdkBitmap *mask = (GdkBitmap *) NULL;
     if (the_one.GetMask()) mask = the_one.GetMask()->GetBitmap();
 
-    GtkWidget *child = BUTTON_CHILD(m_widget);
+    GtkWidget *child = GTK_BIN(m_widget)->child;
     if (child == NULL)
     {
         // initial bitmap
     if (child == NULL)
     {
         // initial bitmap
@@ -284,4 +266,3 @@ void wxBitmapButton::EndSelect()
 }
 
 #endif // wxUSE_BMPBUTTON
 }
 
 #endif // wxUSE_BMPBUTTON
-