+
+ // invalid number - set text as is (wxMSW compatible)
+ GtkDisableEvents();
+ gtk_entry_set_text( GTK_ENTRY(m_widget), wxGTK_CONV( value ) );
+ GtkEnableEvents();
+}
+
+void wxSpinCtrlGTKBase::DoSetValue( double value )
+{
+ wxCHECK_RET( (m_widget != NULL), wxT("invalid spin button") );
+
+ if (wxIsKindOf(this, wxSpinCtrl))
+ value = int(value + 0.5);
+
+ GtkDisableEvents();
+ gtk_spin_button_set_value( GTK_SPIN_BUTTON(m_widget), value);
+ m_value = gtk_spin_button_get_value( GTK_SPIN_BUTTON(m_widget));
+ GtkEnableEvents();
+}
+
+void wxSpinCtrlGTKBase::SetSnapToTicks(bool snap_to_ticks)
+{
+ wxCHECK_RET( (m_widget != NULL), "invalid spin button" );
+
+ gtk_spin_button_set_snap_to_ticks( GTK_SPIN_BUTTON(m_widget), snap_to_ticks);
+}
+
+void wxSpinCtrlGTKBase::SetSelection(long from, long to)
+{
+ // translate from wxWidgets conventions to GTK+ ones: (-1, -1) means the
+ // entire range
+ if ( from == -1 && to == -1 )