]> git.saurik.com Git - wxWidgets.git/blobdiff - contrib/src/ogl/constrnt.cpp
bug fixes for using wxTransientPopupWindow and wxDP_ALLOWNONE support from Andreas...
[wxWidgets.git] / contrib / src / ogl / constrnt.cpp
index c2addad443874a557f9a61c44af97b7499e1aea2..6d5268bec487476900d9d0071c4d2e891e80d5c1 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     12/07/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Created:     12/07/98
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
 /////////////////////////////////////////////////////////////////////////////
 
 #ifdef __GNUG__
 #include <wx/wx.h>
 #endif
 
 #include <wx/wx.h>
 #endif
 
-#include <wx/wxexpr.h>
+#if wxUSE_PROLOGIO
+#include <wx/deprecated/wxexpr.h>
+#endif
+
+#include "wx/ogl/ogl.h"
 
 
-#include <wx/ogl/basic.h>
-#include <wx/ogl/constrnt.h>
-#include <wx/ogl/canvas.h>
 
 wxList *wxOGLConstraintTypes = NULL;
 
 
 wxList *wxOGLConstraintTypes = NULL;
 
@@ -58,51 +59,51 @@ void OGLInitializeConstraintTypes()
     wxOGLConstraintTypes = new wxList(wxKEY_INTEGER);
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_CENTRED_VERTICALLY,
     wxOGLConstraintTypes = new wxList(wxKEY_INTEGER);
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_CENTRED_VERTICALLY,
-        new wxOGLConstraintType(gyCONSTRAINT_CENTRED_VERTICALLY, "Centre vertically", "centred vertically w.r.t."));
+        new wxOGLConstraintType(gyCONSTRAINT_CENTRED_VERTICALLY, wxT("Centre vertically"), wxT("centred vertically w.r.t.")));
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_CENTRED_HORIZONTALLY,
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_CENTRED_HORIZONTALLY,
-        new wxOGLConstraintType(gyCONSTRAINT_CENTRED_HORIZONTALLY, "Centre horizontally", "centred horizontally w.r.t."));
+        new wxOGLConstraintType(gyCONSTRAINT_CENTRED_HORIZONTALLY, wxT("Centre horizontally"), wxT("centred horizontally w.r.t.")));
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_CENTRED_BOTH,
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_CENTRED_BOTH,
-        new wxOGLConstraintType(gyCONSTRAINT_CENTRED_BOTH, "Centre", "centred w.r.t."));
+        new wxOGLConstraintType(gyCONSTRAINT_CENTRED_BOTH, wxT("Centre"), wxT("centred w.r.t.")));
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_LEFT_OF,
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_LEFT_OF,
-        new wxOGLConstraintType(gyCONSTRAINT_LEFT_OF, "Left of", "left of"));
+        new wxOGLConstraintType(gyCONSTRAINT_LEFT_OF, wxT("Left of"), wxT("left of")));
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_RIGHT_OF,
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_RIGHT_OF,
-        new wxOGLConstraintType(gyCONSTRAINT_RIGHT_OF, "Right of", "right of"));
+        new wxOGLConstraintType(gyCONSTRAINT_RIGHT_OF, wxT("Right of"), wxT("right of")));
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_ABOVE,
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_ABOVE,
-        new wxOGLConstraintType(gyCONSTRAINT_ABOVE, "Above", "above"));
+        new wxOGLConstraintType(gyCONSTRAINT_ABOVE, wxT("Above"), wxT("above")));
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_BELOW,
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_BELOW,
-        new wxOGLConstraintType(gyCONSTRAINT_BELOW, "Below", "below"));
+        new wxOGLConstraintType(gyCONSTRAINT_BELOW, wxT("Below"), wxT("below")));
 
     // Alignment
     wxOGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_TOP,
 
     // Alignment
     wxOGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_TOP,
-        new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_TOP, "Top-aligned", "aligned to the top of"));
+        new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_TOP, wxT("Top-aligned"), wxT("aligned to the top of")));
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_BOTTOM,
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_BOTTOM,
-        new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_BOTTOM, "Bottom-aligned", "aligned to the bottom of"));
+        new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_BOTTOM, wxT("Bottom-aligned"), wxT("aligned to the bottom of")));
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_LEFT,
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_LEFT,
-        new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_LEFT, "Left-aligned", "aligned to the left of"));
+        new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_LEFT, wxT("Left-aligned"), wxT("aligned to the left of")));
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_RIGHT,
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_ALIGNED_RIGHT,
-        new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_RIGHT, "Right-aligned", "aligned to the right of"));
+        new wxOGLConstraintType(gyCONSTRAINT_ALIGNED_RIGHT, wxT("Right-aligned"), wxT("aligned to the right of")));
 
     // Mid-alignment
     wxOGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_TOP,
 
     // Mid-alignment
     wxOGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_TOP,
-        new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_TOP, "Top-midaligned", "centred on the top of"));
+        new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_TOP, wxT("Top-midaligned"), wxT("centred on the top of")));
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_BOTTOM,
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_BOTTOM,
-        new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_BOTTOM, "Bottom-midaligned", "centred on the bottom of"));
+        new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_BOTTOM, wxT("Bottom-midaligned"), wxT("centred on the bottom of")));
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_LEFT,
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_LEFT,
-        new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_LEFT, "Left-midaligned", "centred on the left of"));
+        new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_LEFT, wxT("Left-midaligned"), wxT("centred on the left of")));
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_RIGHT,
 
     wxOGLConstraintTypes->Append(gyCONSTRAINT_MIDALIGNED_RIGHT,
-        new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_RIGHT, "Right-midaligned", "centred on the right of"));
+        new wxOGLConstraintType(gyCONSTRAINT_MIDALIGNED_RIGHT, wxT("Right-midaligned"), wxT("centred on the right of")));
 }
 
 void OGLCleanUpConstraintTypes()
 }
 
 void OGLCleanUpConstraintTypes()
@@ -110,12 +111,12 @@ void OGLCleanUpConstraintTypes()
     if (!wxOGLConstraintTypes)
         return;
 
     if (!wxOGLConstraintTypes)
         return;
 
-    wxNode* node = wxOGLConstraintTypes->First();
+    wxNode* node = wxOGLConstraintTypes->GetFirst();
     while (node)
     {
     while (node)
     {
-        wxOGLConstraintType* ct = (wxOGLConstraintType*) node->Data();
+        wxOGLConstraintType* ct = (wxOGLConstraintType*) node->GetData();
         delete ct;
         delete ct;
-        node = node->Next();
+        node = node->GetNext();
     }
     delete wxOGLConstraintTypes;
     wxOGLConstraintTypes = NULL;
     }
     delete wxOGLConstraintTypes;
     wxOGLConstraintTypes = NULL;
@@ -137,13 +138,13 @@ wxOGLConstraint::wxOGLConstraint(int type, wxShape *constraining, wxList& constr
   m_constrainingObject = constraining;
 
   m_constraintId = 0;
   m_constrainingObject = constraining;
 
   m_constraintId = 0;
-  m_constraintName = "noname";
+  m_constraintName = wxT("noname");
 
 
-  wxNode *node = constrained.First();
+  wxNode *node = constrained.GetFirst();
   while (node)
   {
   while (node)
   {
-    m_constrainedObjects.Append(node->Data());
-    node = node->Next();
+    m_constrainedObjects.Append(node->GetData());
+    node = node->GetNext();
   }
 }
 
   }
 }
 
@@ -159,7 +160,7 @@ bool wxOGLConstraint::Equals(double a, double b)
   return eq;
 }
 
   return eq;
 }
 
-// Return TRUE if anything changed
+// Return true if anything changed
 bool wxOGLConstraint::Evaluate()
 {
   double maxWidth, maxHeight, minWidth, minHeight, x, y;
 bool wxOGLConstraint::Evaluate()
 {
   double maxWidth, maxHeight, minWidth, minHeight, x, y;
@@ -175,17 +176,17 @@ bool wxOGLConstraint::Evaluate()
   {
     case gyCONSTRAINT_CENTRED_VERTICALLY:
     {
   {
     case gyCONSTRAINT_CENTRED_VERTICALLY:
     {
-      int n = m_constrainedObjects.Number();
+      int n = m_constrainedObjects.GetCount();
       double totalObjectHeight = 0.0;
       double totalObjectHeight = 0.0;
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
         totalObjectHeight += height2;
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
         totalObjectHeight += height2;
-        node = node->Next();
+        node = node->GetNext();
       }
       double startY;
       double spacingY;
       }
       double startY;
       double spacingY;
@@ -203,37 +204,37 @@ bool wxOGLConstraint::Evaluate()
       }
 
       // Now position the objects
       }
 
       // Now position the objects
-      bool changed = FALSE;
-      node = m_constrainedObjects.First();
+      bool changed = false;
+      node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
         startY += (double)(spacingY + (height2/2.0));
         if (!Equals(startY, constrainedObject->GetY()))
         {
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
         startY += (double)(spacingY + (height2/2.0));
         if (!Equals(startY, constrainedObject->GetY()))
         {
-          constrainedObject->Move(dc, constrainedObject->GetX(), startY, FALSE);
-          changed = TRUE;
+          constrainedObject->Move(dc, constrainedObject->GetX(), startY, false);
+          changed = true;
         }
         startY += (double)(height2/2.0);
         }
         startY += (double)(height2/2.0);
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
     }
     case gyCONSTRAINT_CENTRED_HORIZONTALLY:
     {
       }
       return changed;
     }
     case gyCONSTRAINT_CENTRED_HORIZONTALLY:
     {
-      int n = m_constrainedObjects.Number();
+      int n = m_constrainedObjects.GetCount();
       double totalObjectWidth = 0.0;
       double totalObjectWidth = 0.0;
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
         totalObjectWidth += width2;
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
         totalObjectWidth += width2;
-        node = node->Next();
+        node = node->GetNext();
       }
       double startX;
       double spacingX;
       }
       double startX;
       double spacingX;
@@ -251,39 +252,39 @@ bool wxOGLConstraint::Evaluate()
       }
 
       // Now position the objects
       }
 
       // Now position the objects
-      bool changed = FALSE;
-      node = m_constrainedObjects.First();
+      bool changed = false;
+      node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
         startX += (double)(spacingX + (width2/2.0));
         if (!Equals(startX, constrainedObject->GetX()))
         {
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
         startX += (double)(spacingX + (width2/2.0));
         if (!Equals(startX, constrainedObject->GetX()))
         {
-          constrainedObject->Move(dc, startX, constrainedObject->GetY(), FALSE);
-          changed = TRUE;
+          constrainedObject->Move(dc, startX, constrainedObject->GetY(), false);
+          changed = true;
         }
         startX += (double)(width2/2.0);
         }
         startX += (double)(width2/2.0);
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
     }
     case gyCONSTRAINT_CENTRED_BOTH:
     {
       }
       return changed;
     }
     case gyCONSTRAINT_CENTRED_BOTH:
     {
-      int n = m_constrainedObjects.Number();
+      int n = m_constrainedObjects.GetCount();
       double totalObjectWidth = 0.0;
       double totalObjectHeight = 0.0;
       double totalObjectWidth = 0.0;
       double totalObjectHeight = 0.0;
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
         totalObjectWidth += width2;
         totalObjectHeight += height2;
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
         totalObjectWidth += width2;
         totalObjectHeight += height2;
-        node = node->Next();
+        node = node->GetNext();
       }
       double startX;
       double spacingX;
       }
       double startX;
       double spacingX;
@@ -317,303 +318,307 @@ bool wxOGLConstraint::Evaluate()
       }
 
       // Now position the objects
       }
 
       // Now position the objects
-      bool changed = FALSE;
-      node = m_constrainedObjects.First();
+      bool changed = false;
+      node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
         startX += (double)(spacingX + (width2/2.0));
         startY += (double)(spacingY + (height2/2.0));
 
         if ((!Equals(startX, constrainedObject->GetX())) || (!Equals(startY, constrainedObject->GetY())))
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
         startX += (double)(spacingX + (width2/2.0));
         startY += (double)(spacingY + (height2/2.0));
 
         if ((!Equals(startX, constrainedObject->GetX())) || (!Equals(startY, constrainedObject->GetY())))
-           {
-          constrainedObject->Move(dc, startX, startY, FALSE);
-          changed = TRUE;
-           }
+        {
+          constrainedObject->Move(dc, startX, startY, false);
+          changed = true;
+        }
 
         startX += (double)(width2/2.0);
         startY += (double)(height2/2.0);
 
 
         startX += (double)(width2/2.0);
         startY += (double)(height2/2.0);
 
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
     }
     case gyCONSTRAINT_LEFT_OF:
     {
       }
       return changed;
     }
     case gyCONSTRAINT_LEFT_OF:
     {
-      bool changed = FALSE;
+      bool changed = false;
 
 
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double x3 = (double)(x - (minWidth/2.0) - (width2/2.0) - m_xSpacing);
         if (!Equals(x3, constrainedObject->GetX()))
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double x3 = (double)(x - (minWidth/2.0) - (width2/2.0) - m_xSpacing);
         if (!Equals(x3, constrainedObject->GetX()))
-           {
-          changed = TRUE;
-          constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE);
-           }
+        {
+          changed = true;
+          constrainedObject->Move(dc, x3, constrainedObject->GetY(), false);
+        }
 
 
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
     }
     case gyCONSTRAINT_RIGHT_OF:
     {
       }
       return changed;
     }
     case gyCONSTRAINT_RIGHT_OF:
     {
-      bool changed = FALSE;
+      bool changed = false;
 
 
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double x3 = (double)(x + (minWidth/2.0) + (width2/2.0) + m_xSpacing);
         if (!Equals(x3, constrainedObject->GetX()))
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double x3 = (double)(x + (minWidth/2.0) + (width2/2.0) + m_xSpacing);
         if (!Equals(x3, constrainedObject->GetX()))
-           {
-          changed = TRUE;
-          constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE);
-           }
+        {
+          changed = true;
+          constrainedObject->Move(dc, x3, constrainedObject->GetY(), false);
+        }
 
 
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
       }
       return changed;
-
-      return FALSE;
     }
     case gyCONSTRAINT_ABOVE:
     {
     }
     case gyCONSTRAINT_ABOVE:
     {
-      bool changed = FALSE;
+      bool changed = false;
 
 
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double y3 = (double)(y - (minHeight/2.0) - (height2/2.0) - m_ySpacing);
         if (!Equals(y3, constrainedObject->GetY()))
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double y3 = (double)(y - (minHeight/2.0) - (height2/2.0) - m_ySpacing);
         if (!Equals(y3, constrainedObject->GetY()))
-           {
-          changed = TRUE;
-          constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE);
-           }
+        {
+          changed = true;
+          constrainedObject->Move(dc, constrainedObject->GetX(), y3, false);
+        }
 
 
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
     }
     case gyCONSTRAINT_BELOW:
     {
       }
       return changed;
     }
     case gyCONSTRAINT_BELOW:
     {
-      bool changed = FALSE;
+      bool changed = false;
 
 
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double y3 = (double)(y + (minHeight/2.0) + (height2/2.0) + m_ySpacing);
         if (!Equals(y3, constrainedObject->GetY()))
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double y3 = (double)(y + (minHeight/2.0) + (height2/2.0) + m_ySpacing);
         if (!Equals(y3, constrainedObject->GetY()))
-           {
-          changed = TRUE;
-          constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE);
-           }
+        {
+          changed = true;
+          constrainedObject->Move(dc, constrainedObject->GetX(), y3, false);
+        }
 
 
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
     }
     case gyCONSTRAINT_ALIGNED_LEFT:
     {
       }
       return changed;
     }
     case gyCONSTRAINT_ALIGNED_LEFT:
     {
-      bool changed = FALSE;
+      bool changed = false;
 
 
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double x3 = (double)(x - (minWidth/2.0) + (width2/2.0) + m_xSpacing);
         if (!Equals(x3, constrainedObject->GetX()))
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double x3 = (double)(x - (minWidth/2.0) + (width2/2.0) + m_xSpacing);
         if (!Equals(x3, constrainedObject->GetX()))
-           {
-          changed = TRUE;
-          constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE);
-           }
+        {
+          changed = true;
+          constrainedObject->Move(dc, x3, constrainedObject->GetY(), false);
+        }
 
 
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
     }
     case gyCONSTRAINT_ALIGNED_RIGHT:
     {
       }
       return changed;
     }
     case gyCONSTRAINT_ALIGNED_RIGHT:
     {
-      bool changed = FALSE;
+      bool changed = false;
 
 
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double x3 = (double)(x + (minWidth/2.0) - (width2/2.0) - m_xSpacing);
         if (!Equals(x3, constrainedObject->GetX()))
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double x3 = (double)(x + (minWidth/2.0) - (width2/2.0) - m_xSpacing);
         if (!Equals(x3, constrainedObject->GetX()))
-           {
-          changed = TRUE;
-          constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE);
-           }
+        {
+          changed = true;
+          constrainedObject->Move(dc, x3, constrainedObject->GetY(), false);
+        }
 
 
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
       }
       return changed;
-
-      return FALSE;
+      #if 0
+      // two returned values ?
+      return false;
+      #endif
     }
     case gyCONSTRAINT_ALIGNED_TOP:
     {
     }
     case gyCONSTRAINT_ALIGNED_TOP:
     {
-      bool changed = FALSE;
+      bool changed = false;
 
 
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double y3 = (double)(y - (minHeight/2.0) + (height2/2.0) + m_ySpacing);
         if (!Equals(y3, constrainedObject->GetY()))
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double y3 = (double)(y - (minHeight/2.0) + (height2/2.0) + m_ySpacing);
         if (!Equals(y3, constrainedObject->GetY()))
-           {
-          changed = TRUE;
-          constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE);
-           }
+        {
+          changed = true;
+          constrainedObject->Move(dc, constrainedObject->GetX(), y3, false);
+        }
 
 
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
     }
     case gyCONSTRAINT_ALIGNED_BOTTOM:
     {
       }
       return changed;
     }
     case gyCONSTRAINT_ALIGNED_BOTTOM:
     {
-      bool changed = FALSE;
+      bool changed = false;
 
 
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double y3 = (double)(y + (minHeight/2.0) - (height2/2.0) - m_ySpacing);
         if (!Equals(y3, constrainedObject->GetY()))
 
         double width2, height2;
         constrainedObject->GetBoundingBoxMax(&width2, &height2);
 
         double y3 = (double)(y + (minHeight/2.0) - (height2/2.0) - m_ySpacing);
         if (!Equals(y3, constrainedObject->GetY()))
-           {
-          changed = TRUE;
-          constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE);
-           }
+        {
+          changed = true;
+          constrainedObject->Move(dc, constrainedObject->GetX(), y3, false);
+        }
 
 
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
     }
     case gyCONSTRAINT_MIDALIGNED_LEFT:
     {
       }
       return changed;
     }
     case gyCONSTRAINT_MIDALIGNED_LEFT:
     {
-      bool changed = FALSE;
+      bool changed = false;
 
 
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double x3 = (double)(x - (minWidth/2.0));
         if (!Equals(x3, constrainedObject->GetX()))
 
         double x3 = (double)(x - (minWidth/2.0));
         if (!Equals(x3, constrainedObject->GetX()))
-           {
-          changed = TRUE;
-          constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE);
-           }
+        {
+          changed = true;
+          constrainedObject->Move(dc, x3, constrainedObject->GetY(), false);
+        }
 
 
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
     }
     case gyCONSTRAINT_MIDALIGNED_RIGHT:
     {
       }
       return changed;
     }
     case gyCONSTRAINT_MIDALIGNED_RIGHT:
     {
-      bool changed = FALSE;
+      bool changed = false;
 
 
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double x3 = (double)(x + (minWidth/2.0));
         if (!Equals(x3, constrainedObject->GetX()))
 
         double x3 = (double)(x + (minWidth/2.0));
         if (!Equals(x3, constrainedObject->GetX()))
-           {
-          changed = TRUE;
-          constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE);
-           }
+        {
+          changed = true;
+          constrainedObject->Move(dc, x3, constrainedObject->GetY(), false);
+        }
 
 
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
       }
       return changed;
-
-      return FALSE;
+      #if 0
+      // two returned values ?
+      return false;
+      #endif
     }
     case gyCONSTRAINT_MIDALIGNED_TOP:
     {
     }
     case gyCONSTRAINT_MIDALIGNED_TOP:
     {
-      bool changed = FALSE;
+      bool changed = false;
 
 
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double y3 = (double)(y - (minHeight/2.0));
         if (!Equals(y3, constrainedObject->GetY()))
 
         double y3 = (double)(y - (minHeight/2.0));
         if (!Equals(y3, constrainedObject->GetY()))
-           {
-          changed = TRUE;
-          constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE);
-           }
+        {
+          changed = true;
+          constrainedObject->Move(dc, constrainedObject->GetX(), y3, false);
+        }
 
 
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
     }
     case gyCONSTRAINT_MIDALIGNED_BOTTOM:
     {
       }
       return changed;
     }
     case gyCONSTRAINT_MIDALIGNED_BOTTOM:
     {
-      bool changed = FALSE;
+      bool changed = false;
 
 
-      wxNode *node = m_constrainedObjects.First();
+      wxNode *node = m_constrainedObjects.GetFirst();
       while (node)
       {
       while (node)
       {
-        wxShape *constrainedObject = (wxShape *)node->Data();
+        wxShape *constrainedObject = (wxShape *)node->GetData();
 
         double y3 = (double)(y + (minHeight/2.0));
         if (!Equals(y3, constrainedObject->GetY()))
 
         double y3 = (double)(y + (minHeight/2.0));
         if (!Equals(y3, constrainedObject->GetY()))
-           {
-          changed = TRUE;
-          constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE);
-           }
+        {
+          changed = true;
+          constrainedObject->Move(dc, constrainedObject->GetX(), y3, false);
+        }
 
 
-        node = node->Next();
+        node = node->GetNext();
       }
       return changed;
     }
       }
       return changed;
     }
-
+    #if 0
+    // default value handled in main function body
     default:
     default:
-      return FALSE;
+      return false;
+    #endif
   }
   }
-  return FALSE;
+  return false;
 }
 
 }