X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/03ed1dae4f2e68ac829adfb961b4379055ca1038..8f2ee25db4652f96f28bc8f8370bebc974e533ff:/src/gtk/scrolbar.cpp?ds=inline diff --git a/src/gtk/scrolbar.cpp b/src/gtk/scrolbar.cpp index 28cf2350d8..7c8b236b7f 100644 --- a/src/gtk/scrolbar.cpp +++ b/src/gtk/scrolbar.cpp @@ -46,6 +46,7 @@ static const float sensitivity = 0.02; // FIXME: is GtkScrollType really passed to us as 2nd argument? +extern "C" { static void gtk_scrollbar_callback( GtkAdjustment *adjust, SCROLLBAR_CBACK_ARG wxScrollBar *win ) @@ -67,10 +68,6 @@ static void gtk_scrollbar_callback( GtkAdjustment *adjust, int orient = win->HasFlag(wxSB_VERTICAL) ? wxVERTICAL : wxHORIZONTAL; - wxScrollEvent event( command, win->GetId(), value, orient ); - event.SetEventObject( win ); - win->GetEventHandler()->ProcessEvent( event ); - // throw a LINEUP / LINEDOWN event if necessary if (g_currentUpDownEvent != wxEVT_NULL) { @@ -78,6 +75,11 @@ static void gtk_scrollbar_callback( GtkAdjustment *adjust, event.SetEventObject( win ); win->GetEventHandler()->ProcessEvent( event ); } + + // throw other event (wxEVT_SCROLL_THUMBTRACK) + wxScrollEvent event( command, win->GetId(), value, orient ); + event.SetEventObject( win ); + win->GetEventHandler()->ProcessEvent( event ); /* wxCommandEvent cevent( wxEVT_COMMAND_SCROLLBAR_UPDATED, win->GetId() ); @@ -85,10 +87,12 @@ static void gtk_scrollbar_callback( GtkAdjustment *adjust, win->ProcessEvent( cevent ); */ } +} //----------------------------------------------------------------------------- // "button_press_event" from slider //----------------------------------------------------------------------------- +extern "C" { static gint gtk_scrollbar_button_press_callback( GtkRange *widget, GdkEventButton *gdk_event, wxScrollBar *win ) @@ -127,11 +131,13 @@ static gint gtk_scrollbar_button_press_callback( GtkRange *widget, return FALSE; } +} //----------------------------------------------------------------------------- // "button_release_event" from slider //----------------------------------------------------------------------------- +extern "C" { static gint gtk_scrollbar_button_release_callback( GtkRange *WXUNUSED(widget), GdkEventButton *WXUNUSED(gdk_event), @@ -158,6 +164,7 @@ gtk_scrollbar_button_release_callback( GtkRange *WXUNUSED(widget), return FALSE; } +} //----------------------------------------------------------------------------- // wxScrollBar