no changes (reformatted some code just to be able to read it)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15790 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2002-06-07 23:37:03 +00:00
parent dc429f89a6
commit 1e2a653bec

View File

@@ -175,9 +175,10 @@ void wxWindowBase::InitBase()
#endif // wxUSE_PALETTE #endif // wxUSE_PALETTE
m_virtualSize = wxDefaultSize; m_virtualSize = wxDefaultSize;
m_minVirtualWidth = -1;
m_minVirtualHeight = -1; m_minVirtualWidth =
m_maxVirtualWidth = -1; m_minVirtualHeight =
m_maxVirtualWidth =
m_maxVirtualHeight = -1; m_maxVirtualHeight = -1;
// Whether we're using the current theme for this window (wxGTK only for now) // Whether we're using the current theme for this window (wxGTK only for now)
@@ -580,13 +581,16 @@ void wxWindowBase::SetVirtualSizeHints( int minW, int minH,
void wxWindowBase::DoSetVirtualSize( int x, int y ) void wxWindowBase::DoSetVirtualSize( int x, int y )
{ {
if( m_minVirtualWidth != -1 && m_minVirtualWidth > x ) x = m_minVirtualWidth; if ( m_minVirtualWidth != -1 && m_minVirtualWidth > x )
if( m_maxVirtualWidth != -1 && m_maxVirtualWidth < x ) x = m_maxVirtualWidth; x = m_minVirtualWidth;
if( m_minVirtualHeight != -1 && m_minVirtualHeight > y ) y = m_minVirtualHeight; if ( m_maxVirtualWidth != -1 && m_maxVirtualWidth < x )
if( m_maxVirtualHeight != -1 && m_maxVirtualHeight < y ) y = m_maxVirtualHeight; x = m_maxVirtualWidth;
if ( m_minVirtualHeight != -1 && m_minVirtualHeight > y )
y = m_minVirtualHeight;
if ( m_maxVirtualHeight != -1 && m_maxVirtualHeight < y )
y = m_maxVirtualHeight;
m_virtualSize.SetWidth( x ); m_virtualSize = wxSize(x, y);
m_virtualSize.SetHeight( y );
} }
wxSize wxWindowBase::DoGetVirtualSize() const wxSize wxWindowBase::DoGetVirtualSize() const