Change required for new event types.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@9152 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
adb21613bc
commit
1a8caf94ab
@ -287,63 +287,49 @@ int wxScrolledWindow::CalcScrollInc(wxScrollWinEvent& event)
|
||||
int orient = event.GetOrientation();
|
||||
|
||||
int nScrollInc = 0;
|
||||
switch (event.GetEventType())
|
||||
if (event.GetEventType() == wxEVT_SCROLLWIN_TOP)
|
||||
{
|
||||
case wxEVT_SCROLLWIN_TOP:
|
||||
{
|
||||
if (orient == wxHORIZONTAL)
|
||||
nScrollInc = - m_xScrollPosition;
|
||||
else
|
||||
nScrollInc = - m_yScrollPosition;
|
||||
break;
|
||||
}
|
||||
case wxEVT_SCROLLWIN_BOTTOM:
|
||||
{
|
||||
} else
|
||||
if (event.GetEventType() == wxEVT_SCROLLWIN_BOTTOM)
|
||||
{
|
||||
if (orient == wxHORIZONTAL)
|
||||
nScrollInc = m_xScrollLines - m_xScrollPosition;
|
||||
else
|
||||
nScrollInc = m_yScrollLines - m_yScrollPosition;
|
||||
break;
|
||||
}
|
||||
case wxEVT_SCROLLWIN_LINEUP:
|
||||
{
|
||||
} else
|
||||
if (event.GetEventType() == wxEVT_SCROLLWIN_LINEUP)
|
||||
{
|
||||
nScrollInc = -1;
|
||||
break;
|
||||
}
|
||||
case wxEVT_SCROLLWIN_LINEDOWN:
|
||||
{
|
||||
} else
|
||||
if (event.GetEventType() == wxEVT_SCROLLWIN_LINEDOWN)
|
||||
{
|
||||
nScrollInc = 1;
|
||||
break;
|
||||
}
|
||||
case wxEVT_SCROLLWIN_PAGEUP:
|
||||
{
|
||||
} else
|
||||
if (event.GetEventType() == wxEVT_SCROLLWIN_PAGEUP)
|
||||
{
|
||||
if (orient == wxHORIZONTAL)
|
||||
nScrollInc = -GetScrollPageSize(wxHORIZONTAL);
|
||||
else
|
||||
nScrollInc = -GetScrollPageSize(wxVERTICAL);
|
||||
break;
|
||||
}
|
||||
case wxEVT_SCROLLWIN_PAGEDOWN:
|
||||
{
|
||||
} else
|
||||
if (event.GetEventType() == wxEVT_SCROLLWIN_PAGEDOWN)
|
||||
{
|
||||
if (orient == wxHORIZONTAL)
|
||||
nScrollInc = GetScrollPageSize(wxHORIZONTAL);
|
||||
else
|
||||
nScrollInc = GetScrollPageSize(wxVERTICAL);
|
||||
break;
|
||||
}
|
||||
case wxEVT_SCROLLWIN_THUMBTRACK:
|
||||
case wxEVT_SCROLLWIN_THUMBRELEASE:
|
||||
{
|
||||
} else
|
||||
if ((event.GetEventType() == wxEVT_SCROLLWIN_THUMBTRACK) ||
|
||||
(event.GetEventType() == wxEVT_SCROLLWIN_THUMBRELEASE))
|
||||
{
|
||||
if (orient == wxHORIZONTAL)
|
||||
nScrollInc = pos - m_xScrollPosition;
|
||||
else
|
||||
nScrollInc = pos - m_yScrollPosition;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (orient == wxHORIZONTAL)
|
||||
|
@ -1093,25 +1093,29 @@ static void AdjustEventButtonState(wxMouseEvent& event)
|
||||
// for compatibility with MSW and common sense we want m_leftDown be TRUE
|
||||
// for a LEFT_DOWN event, not FALSE, so we will invert
|
||||
// left/right/middleDown for the corresponding click events
|
||||
switch ( event.GetEventType() )
|
||||
|
||||
if ((event.GetEventType() == wxEVT_LEFT_DOWN) ||
|
||||
(event.GetEventType() == wxEVT_LEFT_DCLICK) ||
|
||||
(event.GetEventType() == wxEVT_LEFT_UP))
|
||||
{
|
||||
case wxEVT_LEFT_DOWN:
|
||||
case wxEVT_LEFT_DCLICK:
|
||||
case wxEVT_LEFT_UP:
|
||||
event.m_leftDown = !event.m_leftDown;
|
||||
break;
|
||||
event.m_leftDown = !event.m_leftDown;
|
||||
return;
|
||||
}
|
||||
|
||||
case wxEVT_MIDDLE_DOWN:
|
||||
case wxEVT_MIDDLE_DCLICK:
|
||||
case wxEVT_MIDDLE_UP:
|
||||
event.m_middleDown = !event.m_middleDown;
|
||||
break;
|
||||
if ((event.GetEventType() == wxEVT_MIDDLE_DOWN) ||
|
||||
(event.GetEventType() == wxEVT_MIDDLE_DCLICK) ||
|
||||
(event.GetEventType() == wxEVT_MIDDLE_UP))
|
||||
{
|
||||
event.m_middleDown = !event.m_middleDown;
|
||||
return;
|
||||
}
|
||||
|
||||
case wxEVT_RIGHT_DOWN:
|
||||
case wxEVT_RIGHT_DCLICK:
|
||||
case wxEVT_RIGHT_UP:
|
||||
event.m_rightDown = !event.m_rightDown;
|
||||
break;
|
||||
if ((event.GetEventType() == wxEVT_RIGHT_DOWN) ||
|
||||
(event.GetEventType() == wxEVT_RIGHT_DCLICK) ||
|
||||
(event.GetEventType() == wxEVT_RIGHT_UP))
|
||||
{
|
||||
event.m_rightDown = !event.m_rightDown;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1093,25 +1093,29 @@ static void AdjustEventButtonState(wxMouseEvent& event)
|
||||
// for compatibility with MSW and common sense we want m_leftDown be TRUE
|
||||
// for a LEFT_DOWN event, not FALSE, so we will invert
|
||||
// left/right/middleDown for the corresponding click events
|
||||
switch ( event.GetEventType() )
|
||||
|
||||
if ((event.GetEventType() == wxEVT_LEFT_DOWN) ||
|
||||
(event.GetEventType() == wxEVT_LEFT_DCLICK) ||
|
||||
(event.GetEventType() == wxEVT_LEFT_UP))
|
||||
{
|
||||
case wxEVT_LEFT_DOWN:
|
||||
case wxEVT_LEFT_DCLICK:
|
||||
case wxEVT_LEFT_UP:
|
||||
event.m_leftDown = !event.m_leftDown;
|
||||
break;
|
||||
event.m_leftDown = !event.m_leftDown;
|
||||
return;
|
||||
}
|
||||
|
||||
case wxEVT_MIDDLE_DOWN:
|
||||
case wxEVT_MIDDLE_DCLICK:
|
||||
case wxEVT_MIDDLE_UP:
|
||||
event.m_middleDown = !event.m_middleDown;
|
||||
break;
|
||||
if ((event.GetEventType() == wxEVT_MIDDLE_DOWN) ||
|
||||
(event.GetEventType() == wxEVT_MIDDLE_DCLICK) ||
|
||||
(event.GetEventType() == wxEVT_MIDDLE_UP))
|
||||
{
|
||||
event.m_middleDown = !event.m_middleDown;
|
||||
return;
|
||||
}
|
||||
|
||||
case wxEVT_RIGHT_DOWN:
|
||||
case wxEVT_RIGHT_DCLICK:
|
||||
case wxEVT_RIGHT_UP:
|
||||
event.m_rightDown = !event.m_rightDown;
|
||||
break;
|
||||
if ((event.GetEventType() == wxEVT_RIGHT_DOWN) ||
|
||||
(event.GetEventType() == wxEVT_RIGHT_DCLICK) ||
|
||||
(event.GetEventType() == wxEVT_RIGHT_UP))
|
||||
{
|
||||
event.m_rightDown = !event.m_rightDown;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user