From 3c2eea9f92f6d12e26f0e4f0f89621b7e7ba42f2 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 17 Jun 2014 15:05:52 +0000 Subject: [PATCH] Clarify wxEVT_SLIDER event handler argument type in the documentation. Unlike all other events generated by wxSlider, this one receives a wxCommandEvent and not a wxScrollEvent. Unfortunately @beginEventEmissionTable doesn't handle the case of a class producing events of different types, perhaps it shouldn't be used at all here. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76719 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- interface/wx/slider.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/interface/wx/slider.h b/interface/wx/slider.h index 3a1bae6acf..b97122ba53 100644 --- a/interface/wx/slider.h +++ b/interface/wx/slider.h @@ -30,7 +30,10 @@ On Windows, the track bar control is used. - Slider events are handled in the same way as a scrollbar. + Slider generates the same events as wxScrollBar but in practice the most + convenient way to process wxSlider updates is by handling the + slider-specific @c wxEVT_SLIDER event which carries wxCommandEvent + containing just the latest slider position. @beginStyleTable @style{wxSL_HORIZONTAL} @@ -118,6 +121,8 @@ @event{EVT_SLIDER(id, func)} Process @c wxEVT_SLIDER which is generated after any change of wxSlider position in addition to one of the events above. + Notice that the handler of this event receives a wxCommandEvent as + argument and not wxScrollEvent, as all the other handlers. @endEventTable @section slider_diff The difference between EVT_SCROLL_THUMBRELEASE and EVT_SCROLL_CHANGED