scrolling with kbd generates scroll events too
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10910 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -809,6 +809,9 @@ void wxScrollHelper::HandleOnChar(wxKeyEvent& event)
|
|||||||
szy = -1;
|
szy = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int xScrollOld = m_xScrollPosition,
|
||||||
|
yScrollOld = m_yScrollPosition;
|
||||||
|
|
||||||
int dsty;
|
int dsty;
|
||||||
switch ( event.KeyCode() )
|
switch ( event.KeyCode() )
|
||||||
{
|
{
|
||||||
@@ -851,6 +854,22 @@ void wxScrollHelper::HandleOnChar(wxKeyEvent& event)
|
|||||||
// not for us
|
// not for us
|
||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( m_xScrollPosition != xScrollOld )
|
||||||
|
{
|
||||||
|
wxScrollWinEvent event(wxEVT_SCROLLWIN_THUMBTRACK, m_xScrollPosition,
|
||||||
|
wxHORIZONTAL);
|
||||||
|
event.SetEventObject(m_win);
|
||||||
|
m_win->GetEventHandler()->ProcessEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
if ( m_yScrollPosition != yScrollOld )
|
||||||
|
{
|
||||||
|
wxScrollWinEvent event(wxEVT_SCROLLWIN_THUMBTRACK, m_yScrollPosition,
|
||||||
|
wxVERTICAL);
|
||||||
|
event.SetEventObject(m_win);
|
||||||
|
m_win->GetEventHandler()->ProcessEvent(event);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
@@ -732,6 +732,9 @@ void wxScrolledWindow::OnChar(wxKeyEvent& event)
|
|||||||
szy = -1;
|
szy = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int xScrollOld = GetScrollPos(wxHORIZONTAL),
|
||||||
|
yScrollOld = GetScrollPos(wxVERTICAL);
|
||||||
|
|
||||||
int dsty;
|
int dsty;
|
||||||
switch ( event.KeyCode() )
|
switch ( event.KeyCode() )
|
||||||
{
|
{
|
||||||
@@ -773,6 +776,25 @@ void wxScrolledWindow::OnChar(wxKeyEvent& event)
|
|||||||
default:
|
default:
|
||||||
// not for us
|
// not for us
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int xScroll = GetScrollPos(wxHORIZONTAL);
|
||||||
|
if ( xScroll != xScrollOld )
|
||||||
|
{
|
||||||
|
wxScrollWinEvent event(wxEVT_SCROLLWIN_THUMBTRACK, xScroll,
|
||||||
|
wxHORIZONTAL);
|
||||||
|
event.SetEventObject(this);
|
||||||
|
GetEventHandler()->ProcessEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
int yScroll = GetScrollPos(wxVERTICAL);
|
||||||
|
if ( yScroll != yScrollOld )
|
||||||
|
{
|
||||||
|
wxScrollWinEvent event(wxEVT_SCROLLWIN_THUMBTRACK, yScroll,
|
||||||
|
wxVERTICAL);
|
||||||
|
event.SetEventObject(this);
|
||||||
|
GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -732,6 +732,9 @@ void wxScrolledWindow::OnChar(wxKeyEvent& event)
|
|||||||
szy = -1;
|
szy = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int xScrollOld = GetScrollPos(wxHORIZONTAL),
|
||||||
|
yScrollOld = GetScrollPos(wxVERTICAL);
|
||||||
|
|
||||||
int dsty;
|
int dsty;
|
||||||
switch ( event.KeyCode() )
|
switch ( event.KeyCode() )
|
||||||
{
|
{
|
||||||
@@ -773,6 +776,25 @@ void wxScrolledWindow::OnChar(wxKeyEvent& event)
|
|||||||
default:
|
default:
|
||||||
// not for us
|
// not for us
|
||||||
event.Skip();
|
event.Skip();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
int xScroll = GetScrollPos(wxHORIZONTAL);
|
||||||
|
if ( xScroll != xScrollOld )
|
||||||
|
{
|
||||||
|
wxScrollWinEvent event(wxEVT_SCROLLWIN_THUMBTRACK, xScroll,
|
||||||
|
wxHORIZONTAL);
|
||||||
|
event.SetEventObject(this);
|
||||||
|
GetEventHandler()->ProcessEvent(event);
|
||||||
|
}
|
||||||
|
|
||||||
|
int yScroll = GetScrollPos(wxVERTICAL);
|
||||||
|
if ( yScroll != yScrollOld )
|
||||||
|
{
|
||||||
|
wxScrollWinEvent event(wxEVT_SCROLLWIN_THUMBTRACK, yScroll,
|
||||||
|
wxVERTICAL);
|
||||||
|
event.SetEventObject(this);
|
||||||
|
GetEventHandler()->ProcessEvent(event);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user