+void wxWindowBase::SetVirtualSizeHints( int minW, int minH,
+ int maxW, int maxH )
+{
+ m_minVirtualWidth = minW;
+ m_maxVirtualWidth = maxW;
+ m_minVirtualHeight = minH;
+ m_maxVirtualHeight = maxH;
+
+ SetVirtualSize( GetClientSize() );
+}
+
+void wxWindowBase::DoSetVirtualSize( int x, int y )
+{
+ if( m_minVirtualWidth != -1 && m_minVirtualWidth > x ) x = m_minVirtualWidth;
+ if( m_maxVirtualWidth != -1 && m_maxVirtualWidth < x ) 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.SetHeight( y );
+}
+
+wxSize wxWindowBase::DoGetVirtualSize() const
+{
+ wxSize s( GetClientSize() );
+
+ if( m_virtualSize.GetWidth() != -1 )
+ s.SetWidth( m_virtualSize.GetWidth() );
+ if( m_virtualSize.GetHeight() != -1 )
+ s.SetHeight( m_virtualSize.GetHeight() );
+
+ return s;
+}
+