added wxEVT_SCROLL_CHANGED as synonym for wxEVT_SCROLL_ENDSCROLL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34455 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
2d918775fa
commit
cbc855087f
@ -15,6 +15,7 @@ All (GUI):
|
||||
- Radio in menus do not send menu event for selections of already selected item.
|
||||
- Fixed wrong positioning of marks and enumerations in lists of wxHTML.
|
||||
- wxImage::Rotate90 respects alpha channel.
|
||||
- Added wxEVT_SCROLL_CHANGED as synonym for wxEVT_SCROLL_ENDSCROLL
|
||||
|
||||
wxMSW:
|
||||
|
||||
|
@ -4,7 +4,7 @@ To process a scroll event, use these event handler macros to direct input to
|
||||
member functions that take a wxScrollEvent argument. You can use
|
||||
{\tt EVT\_COMMAND\_SCROLL...} macros with window IDs for when intercepting
|
||||
scroll events from controls, or {\tt EVT\_SCROLL...} macros without window IDs
|
||||
for intercepting scroll events from the receiving window - except for this,
|
||||
for intercepting scroll events from the receiving window -- except for this,
|
||||
the macros behave exactly the same.
|
||||
|
||||
\twocolwidtha{9cm}
|
||||
@ -19,7 +19,7 @@ the macros behave exactly the same.
|
||||
\twocolitem{{\bf EVT\_SCROLL\_THUMBTRACK(func)}}{Process wxEVT\_SCROLL\_THUMBTRACK thumbtrack events (frequent events
|
||||
sent as the user drags the thumbtrack).}
|
||||
\twocolitem{{\bf EVT\_SCROLL\_THUMBRELEASE(func)}}{Process wxEVT\_SCROLL\_THUMBRELEASE thumb release events.}
|
||||
\twocolitem{{\bf EVT\_SCROLL\_ENDSCROLL(func)}}{Process wxEVT\_SCROLL\_ENDSCROLL end of scrolling events (MSW only).}
|
||||
\twocolitem{{\bf EVT\_SCROLL\_CHANGED(func)}}{Process wxEVT\_SCROLL\_CHANGED end of scrolling events (MSW only).}
|
||||
\twocolitem{{\bf EVT\_COMMAND\_SCROLL(id, func)}}{Process all scroll events.}
|
||||
\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_TOP(id, func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-top events (minimum position).}
|
||||
\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_BOTTOM(id, func)}}{Process wxEVT\_SCROLL\_TOP scroll-to-bottom events (maximum position).}
|
||||
@ -30,26 +30,26 @@ sent as the user drags the thumbtrack).}
|
||||
\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_THUMBTRACK(id, func)}}{Process wxEVT\_SCROLL\_THUMBTRACK thumbtrack events (frequent events
|
||||
sent as the user drags the thumbtrack).}
|
||||
\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_THUMBRELEASE(func)}}{Process wxEVT\_SCROLL\_THUMBRELEASE thumb release events.}
|
||||
\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_ENDSCROLL(func)}}{Process wxEVT\_SCROLL\_ENDSCROLL end of scrolling events (MSW only).}
|
||||
\twocolitem{{\bf EVT\_COMMAND\_SCROLL\_CHANGED(func)}}{Process wxEVT\_SCROLL\_CHANGED end of scrolling events (MSW only).}
|
||||
\end{twocollist}%
|
||||
|
||||
|
||||
|
||||
\wxheading{The difference between {\tt EVT\_SCROLL\_THUMBRELEASE} and {\tt EVT\_SCROLL\_ENDSCROLL}}
|
||||
\wxheading{The difference between {\tt EVT\_SCROLL\_THUMBRELEASE} and {\tt EVT\_SCROLL\_CHANGED}}
|
||||
|
||||
The {\tt EVT\_SCROLL\_THUMBRELEASE} event is only emitted when actually dragging
|
||||
the thumb using the mouse and releasing it (This {\tt EVT\_SCROLL\_THUMBRELEASE}
|
||||
event is also followed by an {\tt EVT\_SCROLL\_ENDSCROLL} event).
|
||||
event is also followed by an {\tt EVT\_SCROLL\_CHANGED} event).
|
||||
|
||||
The {\tt EVT\_SCROLL\_ENDSCROLL} event also occurs when using the keyboard to
|
||||
The {\tt EVT\_SCROLL\_CHANGED} event also occurs when using the keyboard to
|
||||
change the thumb position, and when clicking next to the thumb (In all these
|
||||
cases the {\tt EVT\_SCROLL\_THUMBRELEASE} event does not happen).
|
||||
|
||||
In short, the {\tt EVT\_SCROLL\_ENDSCROLL} event is triggered when scrolling/
|
||||
In short, the {\tt EVT\_SCROLL\_CHANGED} event is triggered when scrolling/
|
||||
moving has finished. The only exception (unfortunately) is that changing the
|
||||
thumb position using the mousewheel does give a {\tt EVT\_SCROLL\_THUMBRELEASE}
|
||||
event but NOT an {\tt EVT\_SCROLL\_ENDSCROLL} event.
|
||||
event but NOT an {\tt EVT\_SCROLL\_CHANGED} event.
|
||||
|
||||
Please see the widgets sample ("Slider" page) to see the difference
|
||||
between {\tt EVT\_SCROLL\_THUMBRELEASE} and {\tt EVT\_SCROLL\_ENDSCROLL} in action.
|
||||
between {\tt EVT\_SCROLL\_THUMBRELEASE} and {\tt EVT\_SCROLL\_CHANGED} in action.
|
||||
|
||||
|
@ -219,7 +219,7 @@ BEGIN_DECLARE_EVENT_TYPES()
|
||||
DECLARE_EVENT_TYPE(wxEVT_SCROLL_PAGEDOWN, 305)
|
||||
DECLARE_EVENT_TYPE(wxEVT_SCROLL_THUMBTRACK, 306)
|
||||
DECLARE_EVENT_TYPE(wxEVT_SCROLL_THUMBRELEASE, 307)
|
||||
DECLARE_EVENT_TYPE(wxEVT_SCROLL_ENDSCROLL, 308)
|
||||
DECLARE_EVENT_TYPE(wxEVT_SCROLL_CHANGED, 308)
|
||||
|
||||
// Scroll events from wxWindow
|
||||
DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_TOP, 320)
|
||||
@ -642,7 +642,7 @@ private:
|
||||
wxEVT_SCROLL_PAGEDOWN
|
||||
wxEVT_SCROLL_THUMBTRACK
|
||||
wxEVT_SCROLL_THUMBRELEASE
|
||||
wxEVT_SCROLL_ENDSCROLL
|
||||
wxEVT_SCROLL_CHANGED
|
||||
*/
|
||||
|
||||
class WXDLLIMPEXP_CORE wxScrollEvent : public wxCommandEvent
|
||||
@ -2778,7 +2778,7 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
|
||||
#define EVT_SCROLL_PAGEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(func))
|
||||
#define EVT_SCROLL_THUMBTRACK(func) wx__DECLARE_EVT0(wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(func))
|
||||
#define EVT_SCROLL_THUMBRELEASE(func) wx__DECLARE_EVT0(wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(func))
|
||||
#define EVT_SCROLL_ENDSCROLL(func) wx__DECLARE_EVT0(wxEVT_SCROLL_ENDSCROLL, wxScrollEventHandler(func))
|
||||
#define EVT_SCROLL_CHANGED(func) wx__DECLARE_EVT0(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(func))
|
||||
|
||||
#define EVT_SCROLL(func) \
|
||||
EVT_SCROLL_TOP(func) \
|
||||
@ -2789,7 +2789,7 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
|
||||
EVT_SCROLL_PAGEDOWN(func) \
|
||||
EVT_SCROLL_THUMBTRACK(func) \
|
||||
EVT_SCROLL_THUMBRELEASE(func) \
|
||||
EVT_SCROLL_ENDSCROLL(func)
|
||||
EVT_SCROLL_CHANGED(func)
|
||||
|
||||
// Scrolling from wxSlider and wxScrollBar, with an id
|
||||
#define EVT_COMMAND_SCROLL_TOP(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_TOP, winid, wxScrollEventHandler(func))
|
||||
@ -2800,7 +2800,7 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
|
||||
#define EVT_COMMAND_SCROLL_PAGEDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_PAGEDOWN, winid, wxScrollEventHandler(func))
|
||||
#define EVT_COMMAND_SCROLL_THUMBTRACK(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_THUMBTRACK, winid, wxScrollEventHandler(func))
|
||||
#define EVT_COMMAND_SCROLL_THUMBRELEASE(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_THUMBRELEASE, winid, wxScrollEventHandler(func))
|
||||
#define EVT_COMMAND_SCROLL_ENDSCROLL(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_ENDSCROLL, winid, wxScrollEventHandler(func))
|
||||
#define EVT_COMMAND_SCROLL_CHANGED(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_CHANGED, winid, wxScrollEventHandler(func))
|
||||
|
||||
#define EVT_COMMAND_SCROLL(winid, func) \
|
||||
EVT_COMMAND_SCROLL_TOP(winid, func) \
|
||||
@ -2811,7 +2811,12 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
|
||||
EVT_COMMAND_SCROLL_PAGEDOWN(winid, func) \
|
||||
EVT_COMMAND_SCROLL_THUMBTRACK(winid, func) \
|
||||
EVT_COMMAND_SCROLL_THUMBRELEASE(winid, func) \
|
||||
EVT_COMMAND_SCROLL_ENDSCROLL(winid, func)
|
||||
EVT_COMMAND_SCROLL_CHANGED(winid, func)
|
||||
|
||||
// this is the old name of this event, to be deprecated in 2.8
|
||||
#define wxEVT_SCROLL_ENDSCROLL wxEVT_SCROLL_CHANGED
|
||||
#define EVT_COMMAND_SCROLL_ENDSCROLL EVT_COMMAND_SCROLL_CHANGED
|
||||
#define EVT_SCROLL_ENDSCROLL EVT_SCROLL_CHANGED
|
||||
|
||||
// Convenience macros for commonly-used commands
|
||||
#define EVT_CHECKBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHECKBOX_CLICKED, winid, wxCommandEventHandler(func))
|
||||
|
@ -591,7 +591,7 @@ void SliderWidgetsPage::OnSlider(wxScrollEvent& event)
|
||||
wxT("wxEVT_SCROLL_PAGEDOWN"),
|
||||
wxT("wxEVT_SCROLL_THUMBTRACK"),
|
||||
wxT("wxEVT_SCROLL_THUMBRELEASE"),
|
||||
wxT("wxEVT_SCROLL_ENDSCROLL")
|
||||
wxT("wxEVT_SCROLL_CHANGED")
|
||||
};
|
||||
|
||||
int index = eventType - wxEVT_SCROLL_TOP;
|
||||
|
@ -69,7 +69,7 @@ wxEND_FLAGS( wxScrollBarStyle )
|
||||
IMPLEMENT_DYNAMIC_CLASS_XTI(wxScrollBar, wxControl,"wx/scrolbar.h")
|
||||
|
||||
wxBEGIN_PROPERTIES_TABLE(wxScrollBar)
|
||||
wxEVENT_RANGE_PROPERTY( Scroll , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxScrollEvent )
|
||||
wxEVENT_RANGE_PROPERTY( Scroll , wxEVT_SCROLL_TOP , wxEVT_SCROLL_CHANGED , wxScrollEvent )
|
||||
|
||||
wxPROPERTY( ThumbPosition , int , SetThumbPosition, GetThumbPosition, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY( Range , int , SetRange, GetRange, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
@ -205,7 +205,7 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
||||
|
||||
case SB_ENDSCROLL:
|
||||
nScrollInc = 0;
|
||||
scrollEvent = wxEVT_SCROLL_ENDSCROLL;
|
||||
scrollEvent = wxEVT_SCROLL_CHANGED;
|
||||
break;
|
||||
|
||||
default:
|
||||
@ -224,7 +224,7 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
||||
SetThumbPosition(position);
|
||||
}
|
||||
else if ( scrollEvent != wxEVT_SCROLL_THUMBRELEASE &&
|
||||
scrollEvent != wxEVT_SCROLL_ENDSCROLL )
|
||||
scrollEvent != wxEVT_SCROLL_CHANGED )
|
||||
{
|
||||
// don't process the event if there is no displacement,
|
||||
// unless this is a thumb release or end scroll event.
|
||||
|
@ -112,7 +112,7 @@ wxEND_FLAGS( wxSliderStyle )
|
||||
IMPLEMENT_DYNAMIC_CLASS_XTI(wxSlider, wxControl,"wx/scrolbar.h")
|
||||
|
||||
wxBEGIN_PROPERTIES_TABLE(wxSlider)
|
||||
wxEVENT_RANGE_PROPERTY( Scroll , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxScrollEvent )
|
||||
wxEVENT_RANGE_PROPERTY( Scroll , wxEVT_SCROLL_TOP , wxEVT_SCROLL_CHANGED , wxScrollEvent )
|
||||
wxEVENT_PROPERTY( Updated , wxEVT_COMMAND_SLIDER_UPDATED , wxCommandEvent )
|
||||
|
||||
wxPROPERTY( Value , int , SetValue, GetValue , 0, 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
@ -335,7 +335,7 @@ bool wxSlider::MSWOnScroll(int WXUNUSED(orientation),
|
||||
break;
|
||||
|
||||
case SB_ENDSCROLL:
|
||||
scrollEvent = wxEVT_SCROLL_ENDSCROLL;
|
||||
scrollEvent = wxEVT_SCROLL_CHANGED;
|
||||
break;
|
||||
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user