]> git.saurik.com Git - wxWidgets.git/blobdiff - src/common/layout.cpp
"wxGDIObject * => &" related changes (see mail to the list)
[wxWidgets.git] / src / common / layout.cpp
index ab4aee570a2b835714daba6d94b6d4b55c99e9aa..38750aceadaf33ca439cc0b01f292db829ee3a03 100644 (file)
@@ -22,7 +22,7 @@
 
 #include "wx/defs.h"
 
-#if USE_CONSTRAINTS
+#if wxUSE_CONSTRAINTS
 
 #ifndef WX_PRECOMP
 #include "wx/window.h"
@@ -92,7 +92,7 @@ int wxSizerMarginY(wxWindow *win)
 wxIndividualLayoutConstraint::wxIndividualLayoutConstraint()
 {
   myEdge = wxTop; relationship = wxUnconstrained; margin = 0; value = 0; percent = 0; otherEdge = wxTop;
-  done = FALSE; otherWin = NULL;
+  done = FALSE; otherWin = (wxWindow *) NULL;
 }
 
 wxIndividualLayoutConstraint::~wxIndividualLayoutConstraint()
@@ -140,7 +140,7 @@ bool wxIndividualLayoutConstraint::ResetIfWin(wxWindow *otherW)
   if (otherW == otherWin)
   {
     myEdge = wxTop; relationship = wxAsIs; margin = 0; value = 0; percent = 0; otherEdge = wxTop;
-    otherWin = NULL;
+    otherWin = (wxWindow *) NULL;
     return TRUE;
   }
   else
@@ -731,7 +731,7 @@ int wxIndividualLayoutConstraint::GetEdge(wxEdge which,
   // know the dimension is obtainable immediately.
   // E.g. a wxExpandSizer may contain a button (but the button's
   // true parent is a panel, not the sizer)
-  if (other->GetChildren()->Member(thisWin))
+  if (other->GetChildren().Member(thisWin))
   {
     switch (which)
     {
@@ -1054,7 +1054,7 @@ bool wxOldDoLayout(wxWindow *win)
 
   doneSoFar.Append(win);
 
-  wxNode *node = win->GetChildren()->First();
+  wxNode *node = win->GetChildren().First();
   while (node)
   {
     wxWindow *child = (wxWindow *)node->Data();
@@ -1079,7 +1079,7 @@ bool wxOldDoLayout(wxWindow *win)
   while ((noChanges > 0) && (noIterations < maxIterations))
   {
     noChanges = 0;
-    wxNode *node = win->GetChildren()->First();
+    wxNode *node = win->GetChildren().First();
     while (node)
     {
       wxWindow *child = (wxWindow *)node->Data();
@@ -1104,7 +1104,7 @@ bool wxOldDoLayout(wxWindow *win)
 */
   // Now set the sizes and positions of the children, and
   // recursively call Layout().
-  node = win->GetChildren()->First();
+  node = win->GetChildren().First();
   while (node)
   {
     wxWindow *child = (wxWindow *)node->Data();
@@ -1203,7 +1203,7 @@ wxSizer::~wxSizer()
 {
   // Remove all children without deleting them,
   // or ~wxbWindow will delete proper windows _twice_
-  wxNode *node = GetChildren()->First();
+  wxNode *node = GetChildren().First();
   while (node)
   {
     wxNode *next = node->Next();
@@ -1211,7 +1211,7 @@ wxSizer::~wxSizer()
     if (!win->IsKindOf(CLASSINFO(wxSizer)))
        {
        delete node;
-               win->SetSizerParent(NULL);
+               win->SetSizerParent((wxWindow *) NULL);
        }
     else
     {
@@ -1223,8 +1223,8 @@ wxSizer::~wxSizer()
 
   if (m_sizerParent) // && !m_sizerParent->IsKindOf(CLASSINFO(wxSizer)))
   {
-    m_sizerParent->SetSizer(NULL);
-       m_sizerParent = NULL;
+    m_sizerParent->SetSizer((wxSizer *) NULL);
+       m_sizerParent = (wxWindow *) NULL;
   }
 
 }
@@ -1249,7 +1249,7 @@ void wxSizer::SetBorder(int x, int y)
 void wxSizer::AddSizerChild(wxWindow *child)
 {
   child->SetSizerParent(this);
-  GetChildren()->Append(child);
+  GetChildren().Append(child);
 
   // Add some constraints for the purpose of storing
   // the relative position of the window/sizer
@@ -1272,7 +1272,7 @@ void wxSizer::AddSizerChild(wxWindow *child)
 
 void wxSizer::RemoveSizerChild(wxWindow *child)
 {
-  GetChildren()->DeleteObject(child);
+  GetChildren().DeleteObject(child);
 }
 
 void wxSizer::SetSize(int x, int y, int w, int h, int WXUNUSED(flags))
@@ -1382,7 +1382,7 @@ bool wxSizer::LayoutPhase1(int *noChanges)
       // Find the bounding box and set own size
       int maxX = 0;
       int maxY = 0;
-      wxNode *node = GetChildren()->First();
+      wxNode *node = GetChildren().First();
       while (node)
       {
         int x, y, width, height;
@@ -1580,7 +1580,7 @@ bool wxRowColSizer::LayoutPhase1(int *noChanges)
     int maxX = currentX;
     int maxY = currentY;
     
-    wxNode *node = GetChildren()->First();
+    wxNode *node = GetChildren().First();
     while (node)
     {
       wxWindow *win = (wxWindow *)node->Data();