Added wxEVT_SCROLL[WIN]_THUMBRELEASE

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@5965 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Guillermo Rodriguez Garcia
2000-02-11 17:55:28 +00:00
parent 181bfffdc8
commit 7d56fb8fcd
9 changed files with 30 additions and 43 deletions

View File

@@ -131,7 +131,6 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
wxEventType scrollEvent = wxEVT_NULL;
int nScrollInc;
bool isScrolling = TRUE;
switch ( wParam )
{
case SB_TOP:
@@ -165,8 +164,9 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
break;
case SB_THUMBPOSITION:
isScrolling = FALSE;
/* fall-through */
nScrollInc = pos - position;
scrollEvent = wxEVT_SCROLL_THUMBRELEASE;
break;
case SB_THUMBTRACK:
nScrollInc = pos - position;
@@ -177,10 +177,10 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
nScrollInc = 0;
}
if (( nScrollInc == 0 ) && isScrolling )
// don't process the event if there is no displacement,
// unless this is a thumb release event.
if (( nScrollInc == 0 ) && ( scrollEvent != wxEVT_SCROLL_THUMBRELEASE ))
{
// no event to process, so don't process it
// GRG: always process SB_THUMBPOSITION !
return FALSE;
}
@@ -195,7 +195,6 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
wxScrollEvent event(scrollEvent, m_windowId);
event.SetPosition(new_pos);
event.SetEventObject( this );
event.SetScrolling(isScrolling);
return GetEventHandler()->ProcessEvent(event);
}