]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/fl/gcupdatesmgr.cpp
fix evaluation order bug (patch 1158099)
[wxWidgets.git] / contrib / src / fl / gcupdatesmgr.cpp
index 5790666c9d70288a843aefab6dd0823e8d6f12a7..577ccfd1c33dd762caa02320888e54ddc5d29dda 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     19/10/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Aleksandras Gluchovas 
 // Created:     19/10/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Aleksandras Gluchovas 
-// Licence:       wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
@@ -53,7 +53,7 @@ struct cbRectInfo
 
 static inline cbRectInfo& node_to_rect_info( wxNode* pNode )
 {
 
 static inline cbRectInfo& node_to_rect_info( wxNode* pNode )
 {
-    return *( (cbRectInfo*) (pNode->Data()) );
+    return *( (cbRectInfo*) (pNode->GetData()) );
 }
 
 /***** Implementation for class cbSimpleUpdatesMgr *****/
 }
 
 /***** Implementation for class cbSimpleUpdatesMgr *****/
@@ -96,7 +96,7 @@ void cbGCUpdatesMgr::OnStartChanges()
 
         // store pane state
         pane.mUMgrData.StoreItemState( pane.mBoundsInParent );
 
         // store pane state
         pane.mUMgrData.StoreItemState( pane.mBoundsInParent );
-        pane.mUMgrData.SetDirty( FALSE );
+        pane.mUMgrData.SetDirty( false );
 
         cbRowInfo* pRow = pane.GetFirstRow();
 
 
         cbRowInfo* pRow = pane.GetFirstRow();
 
@@ -106,13 +106,13 @@ void cbGCUpdatesMgr::OnStartChanges()
 
             // store row state
             pRow->mUMgrData.StoreItemState( pRow->mBoundsInParent );
 
             // store row state
             pRow->mUMgrData.StoreItemState( pRow->mBoundsInParent );
-            pRow->mUMgrData.SetDirty( FALSE );
+            pRow->mUMgrData.SetDirty( false );
 
             while( pBar )
             {
                 // store bar state
                 pBar->mUMgrData.StoreItemState( pBar->mBoundsInParent );
 
             while( pBar )
             {
                 // store bar state
                 pBar->mUMgrData.StoreItemState( pBar->mBoundsInParent );
-                pBar->mUMgrData.SetDirty( FALSE );
+                pBar->mUMgrData.SetDirty( false );
 
                 pBar = pBar->mpNext;
             }
 
                 pBar = pBar->mpNext;
             }
@@ -164,20 +164,20 @@ void cbGCUpdatesMgr::UpdateNow()
 
             cbBarInfo* pBar = pRow->GetFirstBar();
 
 
             cbBarInfo* pBar = pRow->GetFirstBar();
 
-            bool rowChanged = FALSE;
-//            bool rowBkPainted  = FALSE;
+            bool rowChanged = false;
+//            bool rowBkPainted  = false;
 
             // FIXME:: the below should not be fixed
             cbBarInfo* barsToRepaint[128];
             // number of bars, that were changed in the current row
             int nBars = 0; 
 
 
             // FIXME:: the below should not be fixed
             cbBarInfo* barsToRepaint[128];
             // number of bars, that were changed in the current row
             int nBars = 0; 
 
-            wxRect r1 = pRow->mUMgrData.mPrevBounds;
-            wxRect r2 = pRow->mBoundsInParent;
+            //wxRect r1 = pRow->mUMgrData.mPrevBounds;
+            //wxRect r2 = pRow->mBoundsInParent;
 
             if ( WasChanged( pRow->mUMgrData, pRow->mBoundsInParent ) )
             
 
             if ( WasChanged( pRow->mUMgrData, pRow->mBoundsInParent ) )
             
-                rowChanged = TRUE;
+                rowChanged = true;
             else
                 while( pBar )
                 {
             else
                 while( pBar )
                 {
@@ -276,13 +276,13 @@ void cbGCUpdatesMgr::UpdateNow()
 
 void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
 {
 
 void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
 {
-    wxNode* pNode1 = items.First();
+    wxNode* pNode1 = items.GetFirst();
 
     while( pNode1 )
     {
         cbRectInfo& info = node_to_rect_info( pNode1 );
 
 
     while( pNode1 )
     {
         cbRectInfo& info = node_to_rect_info( pNode1 );
 
-        wxNode* pNode2 = items.First();
+        wxNode* pNode2 = items.GetFirst();
 
         // and node itself
 
 
         // and node itself
 
@@ -305,10 +305,10 @@ void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
                     mGC.AddDependency( &info,      &otherInfo      );
             }
 
                     mGC.AddDependency( &info,      &otherInfo      );
             }
 
-            pNode2 = pNode2->Next();
+            pNode2 = pNode2->GetNext();
         }
 
         }
 
-        pNode1 = pNode1->Next();
+        pNode1 = pNode1->GetNext();
     }
 
     mGC.ArrangeCollection(); // order nodes according "least-dependency" rule,
     }
 
     mGC.ArrangeCollection(); // order nodes according "least-dependency" rule,
@@ -318,7 +318,7 @@ void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
     // they stand in linear (not cyclic) dependency with other
     // regular nodes).
 
     // they stand in linear (not cyclic) dependency with other
     // regular nodes).
 
-    wxNode* pNode = mGC.GetRegularObjects().First();
+    wxNode* pNode = mGC.GetRegularObjects().GetFirst();
 
     while ( pNode )
     {
 
     while ( pNode )
     {
@@ -330,12 +330,12 @@ void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
         else
             info.mpPane->SizeBar( info.mpBar );
 
         else
             info.mpPane->SizeBar( info.mpBar );
 
-        pNode = pNode->Next();
+        pNode = pNode->GetNext();
     }
 
     // cycled item nodes, need to be both resized and repainted
 
     }
 
     // cycled item nodes, need to be both resized and repainted
 
-    pNode = mGC.GetCycledObjects().First();
+    pNode = mGC.GetCycledObjects().GetFirst();
 
     while ( pNode )
     {
 
     while ( pNode )
     {
@@ -349,8 +349,8 @@ void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
 
             // FIXME FIXME:: excessive!
 
 
             // FIXME FIXME:: excessive!
 
-            pClntWnd->Show( FALSE );
-            pClntWnd->Show( TRUE  );
+            pClntWnd->Show( false );
+            pClntWnd->Show( true  );
 
             // OLD STUFF:: mpLayout->PositionClientWindow();
         }
 
             // OLD STUFF:: mpLayout->PositionClientWindow();
         }
@@ -374,26 +374,26 @@ void cbGCUpdatesMgr::DoRepositionItems( wxList& items )
             // FIXME FIXME:: there's no other way to repaint non-client area of the wxWindow!!
             //                 so we do *excessive* "hide 'n show"
 
             // FIXME FIXME:: there's no other way to repaint non-client area of the wxWindow!!
             //                 so we do *excessive* "hide 'n show"
 
-            pWnd->Show(FALSE);
-            pWnd->Show(TRUE);
+            pWnd->Show(false);
+            pWnd->Show(true);
                 
             pWnd->Refresh();
         }
 
                 
             pWnd->Refresh();
         }
 
-        pNode = pNode->Next();
+        pNode = pNode->GetNext();
     }
 
     // release data prepared for GC alg.
 
     }
 
     // release data prepared for GC alg.
 
-    pNode = items.First();
+    pNode = items.GetFirst();
 
     while( pNode )
     {
 
     while( pNode )
     {
-        cbRectInfo* pInfo = (cbRectInfo*)(pNode->Data());
+        cbRectInfo* pInfo = (cbRectInfo*)(pNode->GetData());
 
         delete pInfo;
 
 
         delete pInfo;
 
-        pNode = pNode->Next();
+        pNode = pNode->GetNext();
     }
 
     mGC.Reset(); // reinit GC
     }
 
     mGC.Reset(); // reinit GC