]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/sizer.cpp
unused param warning
[wxWidgets.git] / src / common / sizer.cpp
index 4cee972c0065b5939a28edb1356d8ae43c5f1746..1d9073891ff707dcd7ba0326e884f4417c5801d2 100644 (file)
@@ -193,12 +193,10 @@ wxSize wxSizerItem::CalcMin()
     }
     else
     {
-        if ( IsWindow() && (m_flag & wxADJUST_MINSIZE) )
+        if ( IsWindow() && !(m_flag & wxFIXED_MINSIZE) )
         {
-            // By user request, keep the minimal size for this item
-            // in sync with the largest of BestSize and any user supplied
-            // minimum size hint.  Useful in cases where the item is
-            // changeable -- static text labels, etc.
+            // the size of the window may change during run-time, we should
+            // use the current minimal size
             m_minSize = m_window->GetAdjustedBestSize();
         }
 
@@ -737,7 +735,7 @@ bool wxSizer::DoSetItemMinSize( wxWindow *window, int width, int height )
 
         if (item->GetWindow() == window)
         {
-            item->SetInitSize( width, height );
+            item->SetMinSize( width, height );
             return true;
         }
         node = node->GetNext();
@@ -816,7 +814,7 @@ bool wxSizer::DoSetItemMinSize( size_t index, int width, int height )
     else
     {
         // ... but the minimal size of spacers and windows in stored in them
-        item->SetInitSize( width, height );
+        item->SetMinSize( width, height );
     }
 
     return true;
@@ -1140,10 +1138,11 @@ wxSize wxFlexGridSizer::CalcMin()
     m_rowHeights.SetCount(nrows);
     m_colWidths.SetCount(ncols);
 
-    // We have to recalcuate the sizes in case an item has wxADJUST_MINSIZE, has changed
-    // minimum size since the previous layout, or has been hidden using wxSizer::Show().
-    // If all the items in a row/column are hidden, the final dimension of the row/column
-    // will be -1, indicating that the column itself is hidden.
+    // We have to recalcuate the sizes in case the item minimum size has
+    // changed since the previous layout, or the item has been hidden using
+    // wxSizer::Show(). If all the items in a row/column are hidden, the final
+    // dimension of the row/column will be -1, indicating that the column
+    // itself is hidden.
     for( s = m_rowHeights.GetCount(), i = 0; i < s; ++i )
         m_rowHeights[ i ] = -1;
     for( s = m_colWidths.GetCount(), i = 0; i < s; ++i )
@@ -1625,6 +1624,12 @@ wxSize wxStaticBoxSizer::CalcMin()
     return ret;
 }
 
+void wxStaticBoxSizer::ShowItems( bool show )
+{
+    m_staticBox->Show( show );
+    wxBoxSizer::ShowItems( show );
+}
+
 #endif // wxUSE_STATBOX
 
 // ----------------------------------------------------------------------------