- // Calculate overall minimum size
- node = m_children.GetFirst();
- while (node)
- {
- wxSizerItem *item = node->GetData();
-
- if (item->IsShown())
- {
- wxSize size( item->GetMinSizeWithBorder() );
- if (item->GetProportion() != 0)
- {
- if (m_orient == wxHORIZONTAL)
- size.x = (maxMinSize*item->GetProportion())/m_stretchable;
- else
- size.y = (maxMinSize*item->GetProportion())/m_stretchable;
- }
- else
- {
- if (m_orient == wxVERTICAL)
- {
- m_fixedHeight += size.y;
- m_fixedWidth = wxMax( m_fixedWidth, size.x );
- }
- else
- {
- m_fixedWidth += size.x;
- m_fixedHeight = wxMax( m_fixedHeight, size.y );
- }
- }
-
- if (m_orient == wxHORIZONTAL)
- {
- m_minWidth += size.x;
- m_minHeight = wxMax( m_minHeight, size.y );
- }
- else
- {
- m_minHeight += size.y;
- m_minWidth = wxMax( m_minWidth, size.x );
- }
- }
- node = node->GetNext();
- }
-
- return wxSize( m_minWidth, m_minHeight );