add convenient GetViewStart() and Scroll() overloads taking wxPoint instead of 2 int[ pointer]s

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@57527 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2008-12-24 15:11:00 +00:00
parent 9675a49d4e
commit 0b0f6f87d5
6 changed files with 44 additions and 36 deletions

View File

@@ -163,10 +163,10 @@ void wxScrollHelperNative::AdjustScrollbars()
}
}
void wxScrollHelperNative::DoScroll(int orient,
int pos,
int pixelsPerLine,
int *posOld)
void wxScrollHelperNative::DoScrollOneDir(int orient,
int pos,
int pixelsPerLine,
int *posOld)
{
if ( pos != -1 && pos != *posOld && pixelsPerLine )
{
@@ -181,10 +181,10 @@ void wxScrollHelperNative::DoScroll(int orient,
}
}
void wxScrollHelperNative::Scroll( int x_pos, int y_pos )
void wxScrollHelperNative::DoScroll( int x_pos, int y_pos )
{
wxCHECK_RET( m_targetWindow != 0, _T("No target window") );
DoScroll(wxHORIZONTAL, x_pos, m_xScrollPixelsPerLine, &m_xScrollPosition);
DoScroll(wxVERTICAL, y_pos, m_yScrollPixelsPerLine, &m_yScrollPosition);
DoScrollOneDir(wxHORIZONTAL, x_pos, m_xScrollPixelsPerLine, &m_xScrollPosition);
DoScrollOneDir(wxVERTICAL, y_pos, m_yScrollPixelsPerLine, &m_yScrollPosition);
}