+ win->m_value = gtk_spin_button_get_value(spinbutton);
+ if (!win->m_hasVMT || g_blockEventsOnDrag)
+ return;
+
+ // note that we don't use wxSpinCtrl::GetValue() here because it would
+ // adjust the value to fit into the control range and this means that we
+ // would never be able to enter an "invalid" value in the control, even
+ // temporarily - and trying to enter 10 into the control which accepts the
+ // values in range 5..50 is then, ummm, quite challenging (hint: you can't
+ // enter 1!) (VZ)
+
+ if (wxIsKindOf(win, wxSpinCtrl))
+ {
+ wxSpinEvent event(wxEVT_COMMAND_SPINCTRL_UPDATED, win->GetId());
+ event.SetEventObject( win );
+ event.SetPosition( wxRound(win->m_value) ); // FIXME should be SetValue
+ event.SetString(GTK_ENTRY(spinbutton)->text);
+ win->HandleWindowEvent( event );
+ }
+ else // wxIsKindOf(win, wxSpinCtrlDouble)
+ {
+ wxSpinDoubleEvent event( wxEVT_COMMAND_SPINCTRLDOUBLE_UPDATED, win->GetId());
+ event.SetEventObject( win );
+ event.SetValue(win->m_value);
+ event.SetString(GTK_ENTRY(spinbutton)->text);
+ win->HandleWindowEvent( event );
+ }
+}
+}