#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;
if (!wxOGLConstraintTypes)
return;
- wxNode* node = wxOGLConstraintTypes->First();
+ wxNode* node = wxOGLConstraintTypes->GetFirst();
while (node)
{
- wxOGLConstraintType* ct = (wxOGLConstraintType*) node->Data();
+ wxOGLConstraintType* ct = (wxOGLConstraintType*) node->GetData();
delete ct;
- node = node->Next();
+ node = node->GetNext();
}
delete wxOGLConstraintTypes;
wxOGLConstraintTypes = NULL;
m_constraintId = 0;
m_constraintName = wxT("noname");
- wxNode *node = constrained.First();
+ wxNode *node = constrained.GetFirst();
while (node)
{
- m_constrainedObjects.Append(node->Data());
- node = node->Next();
+ m_constrainedObjects.Append(node->GetData());
+ node = node->GetNext();
}
}
{
case gyCONSTRAINT_CENTRED_VERTICALLY:
{
- int n = m_constrainedObjects.Number();
+ int n = m_constrainedObjects.GetCount();
double totalObjectHeight = 0.0;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double width2, height2;
constrainedObject->GetBoundingBoxMax(&width2, &height2);
totalObjectHeight += height2;
- node = node->Next();
+ node = node->GetNext();
}
double startY;
double spacingY;
// Now position the objects
bool changed = FALSE;
- node = m_constrainedObjects.First();
+ node = m_constrainedObjects.GetFirst();
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));
changed = TRUE;
}
startY += (double)(height2/2.0);
- node = node->Next();
+ node = node->GetNext();
}
return changed;
}
case gyCONSTRAINT_CENTRED_HORIZONTALLY:
{
- int n = m_constrainedObjects.Number();
+ int n = m_constrainedObjects.GetCount();
double totalObjectWidth = 0.0;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double width2, height2;
constrainedObject->GetBoundingBoxMax(&width2, &height2);
totalObjectWidth += width2;
- node = node->Next();
+ node = node->GetNext();
}
double startX;
double spacingX;
// Now position the objects
bool changed = FALSE;
- node = m_constrainedObjects.First();
+ node = m_constrainedObjects.GetFirst();
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));
changed = TRUE;
}
startX += (double)(width2/2.0);
- node = node->Next();
+ node = node->GetNext();
}
return changed;
}
case gyCONSTRAINT_CENTRED_BOTH:
{
- int n = m_constrainedObjects.Number();
+ int n = m_constrainedObjects.GetCount();
double totalObjectWidth = 0.0;
double totalObjectHeight = 0.0;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double width2, height2;
constrainedObject->GetBoundingBoxMax(&width2, &height2);
totalObjectWidth += width2;
totalObjectHeight += height2;
- node = node->Next();
+ node = node->GetNext();
}
double startX;
double spacingX;
// Now position the objects
bool changed = FALSE;
- node = m_constrainedObjects.First();
+ node = m_constrainedObjects.GetFirst();
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));
startX += (double)(width2/2.0);
startY += (double)(height2/2.0);
- node = node->Next();
+ node = node->GetNext();
}
return changed;
}
{
bool changed = FALSE;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double width2, height2;
constrainedObject->GetBoundingBoxMax(&width2, &height2);
constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE);
}
- node = node->Next();
+ node = node->GetNext();
}
return changed;
}
{
bool changed = FALSE;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double width2, height2;
constrainedObject->GetBoundingBoxMax(&width2, &height2);
constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE);
}
- node = node->Next();
+ node = node->GetNext();
}
return changed;
-
- return FALSE;
}
case gyCONSTRAINT_ABOVE:
{
bool changed = FALSE;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double width2, height2;
constrainedObject->GetBoundingBoxMax(&width2, &height2);
constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE);
}
- node = node->Next();
+ node = node->GetNext();
}
return changed;
}
{
bool changed = FALSE;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double width2, height2;
constrainedObject->GetBoundingBoxMax(&width2, &height2);
constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE);
}
- node = node->Next();
+ node = node->GetNext();
}
return changed;
}
{
bool changed = FALSE;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double width2, height2;
constrainedObject->GetBoundingBoxMax(&width2, &height2);
constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE);
}
- node = node->Next();
+ node = node->GetNext();
}
return changed;
}
{
bool changed = FALSE;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double width2, height2;
constrainedObject->GetBoundingBoxMax(&width2, &height2);
constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE);
}
- node = node->Next();
+ node = node->GetNext();
}
return changed;
-
+ #if 0
+ // two returned values ?
return FALSE;
+ #endif
}
case gyCONSTRAINT_ALIGNED_TOP:
{
bool changed = FALSE;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double width2, height2;
constrainedObject->GetBoundingBoxMax(&width2, &height2);
constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE);
}
- node = node->Next();
+ node = node->GetNext();
}
return changed;
}
{
bool changed = FALSE;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double width2, height2;
constrainedObject->GetBoundingBoxMax(&width2, &height2);
constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE);
}
- node = node->Next();
+ node = node->GetNext();
}
return changed;
}
{
bool changed = FALSE;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double x3 = (double)(x - (minWidth/2.0));
if (!Equals(x3, constrainedObject->GetX()))
constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE);
}
- node = node->Next();
+ node = node->GetNext();
}
return changed;
}
{
bool changed = FALSE;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double x3 = (double)(x + (minWidth/2.0));
if (!Equals(x3, constrainedObject->GetX()))
constrainedObject->Move(dc, x3, constrainedObject->GetY(), FALSE);
}
- node = node->Next();
+ node = node->GetNext();
}
return changed;
-
+ #if 0
+ // two returned values ?
return FALSE;
+ #endif
}
case gyCONSTRAINT_MIDALIGNED_TOP:
{
bool changed = FALSE;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double y3 = (double)(y - (minHeight/2.0));
if (!Equals(y3, constrainedObject->GetY()))
constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE);
}
- node = node->Next();
+ node = node->GetNext();
}
return changed;
}
{
bool changed = FALSE;
- wxNode *node = m_constrainedObjects.First();
+ wxNode *node = m_constrainedObjects.GetFirst();
while (node)
{
- wxShape *constrainedObject = (wxShape *)node->Data();
+ wxShape *constrainedObject = (wxShape *)node->GetData();
double y3 = (double)(y + (minHeight/2.0));
if (!Equals(y3, constrainedObject->GetY()))
constrainedObject->Move(dc, constrainedObject->GetX(), y3, FALSE);
}
- node = node->Next();
+ node = node->GetNext();
}
return changed;
}
-
+ #if 0
+ // default value handled in main function body
default:
return FALSE;
+ #endif
}
return FALSE;
}