+ {
+ wxSizerItem *item = (wxSizerItem*) node->Data();
+ if (item->GetOption() != 0)
+ {
+ int stretch = item->GetOption();
+ wxSize size( item->CalcMin() );
+ int sizePerStretch;
+ // Integer division rounded up is (a + b - 1) / b
+ if (m_orient == wxHORIZONTAL)
+ sizePerStretch = ( size.x + stretch - 1 ) / stretch;
+ else
+ sizePerStretch = ( size.y + stretch - 1 ) / stretch;
+ if (sizePerStretch > stretchSize)
+ stretchSize = sizePerStretch;
+ }
+ node = node->Next();
+ }
+ // Calculate overall minimum size
+ node = m_children.GetFirst();
+ while (node)