]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/spinctrl.cpp
Made funcs extern...
[wxWidgets.git] / src / gtk1 / spinctrl.cpp
index 6eed70a28629de91550784bbc4f7f888315ea88d..e071efbce9a94a46406eaa9255424e3d98e6123c 100644 (file)
@@ -8,10 +8,13 @@
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
 #pragma implementation "spinctrl.h"
 #endif
 
 #pragma implementation "spinctrl.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #include "wx/spinctrl.h"
 
 #if wxUSE_SPINCTRL
 #include "wx/spinctrl.h"
 
 #if wxUSE_SPINCTRL
@@ -124,9 +127,8 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id,
     m_parent->DoAddChild( this );
 
     PostCreation();
     m_parent->DoAddChild( this );
 
     PostCreation();
+    InheritAttributes();
 
 
-    SetFont( parent->GetFont() );
-    
     wxSize size_best( DoGetBestSize() );
     wxSize new_size( size );
     if (new_size.x == -1)
     wxSize size_best( DoGetBestSize() );
     wxSize new_size( size );
     if (new_size.x == -1)
@@ -138,8 +140,6 @@ bool wxSpinCtrl::Create(wxWindow *parent, wxWindowID id,
     if ((new_size.x != size.x) || (new_size.y != size.y))
         SetSize( new_size.x, new_size.y );
 
     if ((new_size.x != size.x) || (new_size.y != size.y))
         SetSize( new_size.x, new_size.y );
 
-    SetBackgroundColour( parent->GetBackgroundColour() );
-
     SetValue( value );
 
     Show( TRUE );
     SetValue( value );
 
     Show( TRUE );
@@ -282,7 +282,11 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
 
 bool wxSpinCtrl::IsOwnGtkWindow( GdkWindow *window )
 {
 
 bool wxSpinCtrl::IsOwnGtkWindow( GdkWindow *window )
 {
-    return GTK_SPIN_BUTTON(m_widget)->panel == window;
+    if (GTK_SPIN_BUTTON(m_widget)->entry.text_area == window) return TRUE;
+    
+    if (GTK_SPIN_BUTTON(m_widget)->panel == window) return TRUE;
+
+    return FALSE;
 }
 
 void wxSpinCtrl::ApplyWidgetStyle()
 }
 
 void wxSpinCtrl::ApplyWidgetStyle()