Fixed GetVirtualSize for wxGTK's wxScrolledWindow

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15131 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2002-04-13 15:16:11 +00:00
parent 667e2c55ea
commit a6ae98cb7c
2 changed files with 32 additions and 4 deletions

View File

@ -573,10 +573,24 @@ void wxScrolledWindow::EnableScrolling (bool x_scroll, bool y_scroll)
void wxScrolledWindow::GetVirtualSize (int *x, int *y) const
{
wxSize sz(0, 0);
if (m_targetWindow)
sz = m_targetWindow->GetClientSize();
if ( x )
*x = m_xScrollPixelsPerLine * m_xScrollLines;
{
if (m_xScrollPixelsPerLine == 0)
*x = sz.x;
else
*x = m_xScrollPixelsPerLine * m_xScrollLines;
}
if ( y )
*y = m_yScrollPixelsPerLine * m_yScrollLines;
{
if (m_yScrollPixelsPerLine == 0)
*y = sz.y;
else
*y = m_yScrollPixelsPerLine * m_yScrollLines;
}
}
// Where the current view starts from

View File

@ -573,10 +573,24 @@ void wxScrolledWindow::EnableScrolling (bool x_scroll, bool y_scroll)
void wxScrolledWindow::GetVirtualSize (int *x, int *y) const
{
wxSize sz(0, 0);
if (m_targetWindow)
sz = m_targetWindow->GetClientSize();
if ( x )
*x = m_xScrollPixelsPerLine * m_xScrollLines;
{
if (m_xScrollPixelsPerLine == 0)
*x = sz.x;
else
*x = m_xScrollPixelsPerLine * m_xScrollLines;
}
if ( y )
*y = m_yScrollPixelsPerLine * m_yScrollLines;
{
if (m_yScrollPixelsPerLine == 0)
*y = sz.y;
else
*y = m_yScrollPixelsPerLine * m_yScrollLines;
}
}
// Where the current view starts from