-wxSlider::wxSlider( wxWindow *parent, wxWindowID id,
- int value, int minValue, int maxValue,
- const wxPoint& pos, const wxSize& size,
- long style,
-/* const wxValidator& validator = wxDefaultValidator, */
- const wxString& name )
+ if (!win->m_hasVMT) return;
+ if (g_blockEventsOnDrag) return;
+
+ float diff = adjust->value - win->m_oldPos;
+ if (fabs(diff) < 0.2) return;
+
+ win->m_oldPos = adjust->value;
+
+ GtkRange *range = GTK_RANGE( win->m_widget );
+
+ wxEventType command = wxEVT_SCROLL_THUMBTRACK;
+ if (range->scroll_type == GTK_SCROLL_STEP_BACKWARD) command = wxEVT_SCROLL_LINEUP;
+ else if (range->scroll_type == GTK_SCROLL_STEP_FORWARD) command = wxEVT_SCROLL_LINEDOWN;
+ else if (range->scroll_type == GTK_SCROLL_PAGE_BACKWARD) command = wxEVT_SCROLL_PAGEUP;
+ else if (range->scroll_type == GTK_SCROLL_PAGE_FORWARD) command = wxEVT_SCROLL_PAGEDOWN;
+
+ int value = (int)ceil(adjust->value);
+
+ int orient = wxHORIZONTAL;
+ if ( (win->GetWindowStyleFlag() & wxSB_VERTICAL) == wxSB_VERTICAL)
+ orient = wxVERTICAL;
+
+ wxScrollEvent event( command, win->GetId(), value, orient );
+ event.SetEventObject( win );
+ win->GetEventHandler()->ProcessEvent( event );
+
+ wxCommandEvent cevent( wxEVT_COMMAND_SLIDER_UPDATED, win->GetId() );
+ cevent.SetEventObject( win );
+ win->GetEventHandler()->ProcessEvent( cevent );
+}
+
+//-----------------------------------------------------------------------------
+// wxSlider
+//-----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxSlider,wxControl)
+
+wxSlider::wxSlider(void)