]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/spinbutt.cpp
removing unnecessary invalidation in Update, adding a forced update to ScrollWindow...
[wxWidgets.git] / src / gtk / spinbutt.cpp
index 26886024737c550f31b9876122c2318ddab6f1a1..8f5b2263d30213cdf5c756907ea23cc6ed0cfa23 100644 (file)
@@ -5,14 +5,17 @@
 // Modified by:
 // RCS-ID:      $Id$
 // Copyright:   (c) Robert Roebling
-// Licence:     wxWindows licence
+// Licence:     wxWidgets licence
 /////////////////////////////////////////////////////////////////////////////
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "spinbutt.h"
     #pragma implementation "spinbutbase.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #include "wx/spinbutt.h"
 
 #if wxUSE_SPINBTN
@@ -147,11 +150,7 @@ bool wxSpinButton::Create(wxWindow *parent,
 
     m_parent->DoAddChild( this );
 
-    PostCreation();
-
-    SetBackgroundColour( parent->GetBackgroundColour() );
-
-    Show( TRUE );
+    PostCreation(new_size);
 
     return TRUE;
 }
@@ -237,4 +236,13 @@ wxSize wxSpinButton::DoGetBestSize() const
     return wxSize(15, 26);
 }
 
+// static
+wxVisualAttributes
+wxSpinButton::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
+{
+    // TODO: overload to accept functions like gtk_spin_button_new?
+    // Until then use a similar type
+    return GetDefaultAttributesFromGTKWidget(gtk_button_new);
+}
+
 #endif