GetVirtualSize() returns client size values for the m_virtualSize components which are not set (i.e. allow setting only one component of m_virtualSize instead of either none or both)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@32871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-03-17 22:29:20 +00:00
parent f18f464cba
commit c20ab85b60

View File

@ -811,10 +811,17 @@ void wxWindowBase::DoSetVirtualSize( int x, int y )
wxSize wxWindowBase::DoGetVirtualSize() const
{
if (m_virtualSize == wxDefaultSize)
return GetClientSize();
if ( m_virtualSize.IsFullySpecified() )
return m_virtualSize;
return m_virtualSize;
wxSize size = GetClientSize();
if ( m_virtualSize.x != wxDefaultCoord )
size.x = m_virtualSize.x;
if ( m_virtualSize.y != wxDefaultCoord )
size.y = m_virtualSize.y;
return size;
}
// ----------------------------------------------------------------------------