]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/fl/rowlayoutpl.cpp
Baked with Bakefile 0.1.4
[wxWidgets.git] / contrib / src / fl / rowlayoutpl.cpp
index 92af22e8622c6195ab1239aebfe36f08b9241c31..dc180f18d6de6b003e4490bc6b9516268a250f13 100644 (file)
@@ -120,9 +120,13 @@ void cbRowLayoutPlugin::ExpandNotFixedBars( cbRowInfo* pRow )
 {
     ApplyLengthRatios( pRow );
 
+    #if 1
+
    // FIXME:: something's wrong?
    return;
 
+    #else
+
     double freeSpc = (double)GetRowFreeSpace( pRow );
 
     // calculate sum of precents
@@ -156,14 +160,18 @@ void cbRowLayoutPlugin::ExpandNotFixedBars( cbRowInfo* pRow )
         bar.mBounds.x = curX;
         curX = bar.mBounds.x + bar.mBounds.width;
     }
+    #endif
 }
 
-void cbRowLayoutPlugin::AdjustLengthOfInserted( cbRowInfo* pRow, cbBarInfo* pTheBar )
+void cbRowLayoutPlugin::AdjustLengthOfInserted( cbRowInfo* WXUNUSED(pRow), cbBarInfo* WXUNUSED(pTheBar) )
 {
-    return;  // TBD: Makes following code unreachable
+    return;
 
-    // pTheBar is not-fixed
+#if 0
 
+    // TBD: Makes following code unreachable
+
+    // pTheBar is not-fixed
 
     // FIXME:: what is this for??
 
@@ -203,13 +211,16 @@ void cbRowLayoutPlugin::AdjustLengthOfInserted( cbRowInfo* pRow, cbBarInfo* pThe
 
         pTheBar->mBounds.width = freeSpc * (1.0 - pcntSum);
 #endif
+
+#endif
+
 }
 
 void cbRowLayoutPlugin::FitBarsToRange( int from, int till,
                                         cbBarInfo* pTheBar, cbRowInfo* pRow )
 {
-    cbBarInfo* pFromBar = NULL;
-    cbBarInfo* pTillBar = NULL;
+    cbBarInfo* pFromBar;
+    cbBarInfo* pTillBar;
 
     if ( pTheBar->mBounds.x > from )
     {
@@ -249,7 +260,7 @@ void cbRowLayoutPlugin::FitBarsToRange( int from, int till,
       {
             pBar->mBounds.width =
                 wxMax( mpPane->mProps.mMinCBarDim.x,
-                       int( double(freeSpc) * (pBar->mLenRatio/pcntSum) )
+                       (int)( double(freeSpc) * (pBar->mLenRatio/pcntSum) )
                      );
       }
         pBar = pBar->mpNext;
@@ -389,11 +400,11 @@ void cbRowLayoutPlugin::RecalcLengthRatios( cbRowInfo* pRow )
 
 void cbRowLayoutPlugin::ApplyLengthRatios( cbRowInfo* pRow )
 {
+    size_t i;
     double pcntSum = 0;
 
     // FOR NOW:: all-in-one
 
-    size_t i = 0;
     for ( i = 0; i != pRow->mBars.Count(); ++i )
     {
         if ( !pRow->mBars[i]->IsFixed() )
@@ -667,7 +678,7 @@ void cbRowLayoutPlugin::SlideRightSideBars( cbBarInfo* pTheBar )
     }
 }
 
-void cbRowLayoutPlugin::ShiftLeftTrashold( cbBarInfo* pTheBar, cbRowInfo& row )
+void cbRowLayoutPlugin::ShiftLeftTrashold( cbBarInfo* WXUNUSED(pTheBar), cbRowInfo& row )
 {
     wxRect& first = row.mBars[0]->mBounds;
 
@@ -1098,8 +1109,6 @@ void cbRowLayoutPlugin::OnResizeRow( cbResizeRowEvent& event )
     // FIXME:: Next line not used.
     //int     newHeight      = pTheRow->mRowHeight;
 
-    int     freeSpc        = 0;
-
     if ( forUpperHandle )
     {
         // calculate available free space from above,
@@ -1109,8 +1118,6 @@ void cbRowLayoutPlugin::OnResizeRow( cbResizeRowEvent& event )
 
         while( pRow ) 
         {
-            freeSpc += pRow->mRowHeight - event.mpPane->GetMinimalRowHeight( pRow );
-
             pRow = pRow->mpPrev;
         }
     }
@@ -1123,8 +1130,6 @@ void cbRowLayoutPlugin::OnResizeRow( cbResizeRowEvent& event )
 
         while( pRow ) 
         {
-            freeSpc += pRow->mRowHeight - mpPane->GetMinimalRowHeight( pRow );
-
             pRow = pRow->mpNext;
         }
     }