projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove extra '{' which broke docs compilation
[wxWidgets.git]
/
contrib
/
src
/
ogl
/
constrnt.cpp
diff --git
a/contrib/src/ogl/constrnt.cpp
b/contrib/src/ogl/constrnt.cpp
index ddd736d643f9429aabf65737f5717e9d98f09f9a..0e1a104447e2ad3d798707f04ef96f79c6decb0e 100644
(file)
--- a/
contrib/src/ogl/constrnt.cpp
+++ b/
contrib/src/ogl/constrnt.cpp
@@
-6,13
+6,9
@@
// 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__
-#pragma implementation "constrnt.h"
-#endif
-
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
@@
-21,11
+17,11
@@
#endif
#ifndef WX_PRECOMP
#endif
#ifndef WX_PRECOMP
-#include
<wx/wx.h>
+#include
"wx/wx.h"
#endif
#if wxUSE_PROLOGIO
#endif
#if wxUSE_PROLOGIO
-#include
<wx/deprecated/wxexpr.h>
+#include
"wx/deprecated/wxexpr.h"
#endif
#include "wx/ogl/ogl.h"
#endif
#include "wx/ogl/ogl.h"
@@
-160,7
+156,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;
@@
-204,7
+200,7
@@
bool wxOGLConstraint::Evaluate()
}
// Now position the objects
}
// Now position the objects
- bool changed =
FALSE
;
+ bool changed =
false
;
node = m_constrainedObjects.GetFirst();
while (node)
{
node = m_constrainedObjects.GetFirst();
while (node)
{
@@
-214,8
+210,8
@@
bool wxOGLConstraint::Evaluate()
startY += (double)(spacingY + (height2/2.0));
if (!Equals(startY, constrainedObject->GetY()))
{
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);
node = node->GetNext();
}
startY += (double)(height2/2.0);
node = node->GetNext();
@@
-252,7
+248,7
@@
bool wxOGLConstraint::Evaluate()
}
// Now position the objects
}
// Now position the objects
- bool changed =
FALSE
;
+ bool changed =
false
;
node = m_constrainedObjects.GetFirst();
while (node)
{
node = m_constrainedObjects.GetFirst();
while (node)
{
@@
-262,8
+258,8
@@
bool wxOGLConstraint::Evaluate()
startX += (double)(spacingX + (width2/2.0));
if (!Equals(startX, constrainedObject->GetX()))
{
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);
node = node->GetNext();
}
startX += (double)(width2/2.0);
node = node->GetNext();
@@
-318,7
+314,7
@@
bool wxOGLConstraint::Evaluate()
}
// Now position the objects
}
// Now position the objects
- bool changed =
FALSE
;
+ bool changed =
false
;
node = m_constrainedObjects.GetFirst();
while (node)
{
node = m_constrainedObjects.GetFirst();
while (node)
{
@@
-329,10
+325,10
@@
bool wxOGLConstraint::Evaluate()
startY += (double)(spacingY + (height2/2.0));
if ((!Equals(startX, constrainedObject->GetX())) || (!Equals(startY, constrainedObject->GetY())))
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);
@@
-343,7
+339,7
@@
bool wxOGLConstraint::Evaluate()
}
case gyCONSTRAINT_LEFT_OF:
{
}
case gyCONSTRAINT_LEFT_OF:
{
- bool changed =
FALSE
;
+ bool changed =
false
;
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
@@
-355,10
+351,10
@@
bool wxOGLConstraint::Evaluate()
double x3 = (double)(x - (minWidth/2.0) - (width2/2.0) - m_xSpacing);
if (!Equals(x3, constrainedObject->GetX()))
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->GetNext();
}
node = node->GetNext();
}
@@
-366,7
+362,7
@@
bool wxOGLConstraint::Evaluate()
}
case gyCONSTRAINT_RIGHT_OF:
{
}
case gyCONSTRAINT_RIGHT_OF:
{
- bool changed =
FALSE
;
+ bool changed =
false
;
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
@@
-378,10
+374,10
@@
bool wxOGLConstraint::Evaluate()
double x3 = (double)(x + (minWidth/2.0) + (width2/2.0) + m_xSpacing);
if (!Equals(x3, constrainedObject->GetX()))
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->GetNext();
}
node = node->GetNext();
}
@@
-389,7
+385,7
@@
bool wxOGLConstraint::Evaluate()
}
case gyCONSTRAINT_ABOVE:
{
}
case gyCONSTRAINT_ABOVE:
{
- bool changed =
FALSE
;
+ bool changed =
false
;
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
@@
-401,10
+397,10
@@
bool wxOGLConstraint::Evaluate()
double y3 = (double)(y - (minHeight/2.0) - (height2/2.0) - m_ySpacing);
if (!Equals(y3, constrainedObject->GetY()))
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->GetNext();
}
node = node->GetNext();
}
@@
-412,7
+408,7
@@
bool wxOGLConstraint::Evaluate()
}
case gyCONSTRAINT_BELOW:
{
}
case gyCONSTRAINT_BELOW:
{
- bool changed =
FALSE
;
+ bool changed =
false
;
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
@@
-424,10
+420,10
@@
bool wxOGLConstraint::Evaluate()
double y3 = (double)(y + (minHeight/2.0) + (height2/2.0) + m_ySpacing);
if (!Equals(y3, constrainedObject->GetY()))
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->GetNext();
}
node = node->GetNext();
}
@@
-435,7
+431,7
@@
bool wxOGLConstraint::Evaluate()
}
case gyCONSTRAINT_ALIGNED_LEFT:
{
}
case gyCONSTRAINT_ALIGNED_LEFT:
{
- bool changed =
FALSE
;
+ bool changed =
false
;
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
@@
-447,10
+443,10
@@
bool wxOGLConstraint::Evaluate()
double x3 = (double)(x - (minWidth/2.0) + (width2/2.0) + m_xSpacing);
if (!Equals(x3, constrainedObject->GetX()))
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->GetNext();
}
node = node->GetNext();
}
@@
-458,7
+454,7
@@
bool wxOGLConstraint::Evaluate()
}
case gyCONSTRAINT_ALIGNED_RIGHT:
{
}
case gyCONSTRAINT_ALIGNED_RIGHT:
{
- bool changed =
FALSE
;
+ bool changed =
false
;
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
@@
-470,22
+466,22
@@
bool wxOGLConstraint::Evaluate()
double x3 = (double)(x + (minWidth/2.0) - (width2/2.0) - m_xSpacing);
if (!Equals(x3, constrainedObject->GetX()))
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->GetNext();
}
return changed;
#if 0
// two returned values ?
node = node->GetNext();
}
return changed;
#if 0
// two returned values ?
- return
FALSE
;
+ return
false
;
#endif
}
case gyCONSTRAINT_ALIGNED_TOP:
{
#endif
}
case gyCONSTRAINT_ALIGNED_TOP:
{
- bool changed =
FALSE
;
+ bool changed =
false
;
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
@@
-497,10
+493,10
@@
bool wxOGLConstraint::Evaluate()
double y3 = (double)(y - (minHeight/2.0) + (height2/2.0) + m_ySpacing);
if (!Equals(y3, constrainedObject->GetY()))
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->GetNext();
}
node = node->GetNext();
}
@@
-508,7
+504,7
@@
bool wxOGLConstraint::Evaluate()
}
case gyCONSTRAINT_ALIGNED_BOTTOM:
{
}
case gyCONSTRAINT_ALIGNED_BOTTOM:
{
- bool changed =
FALSE
;
+ bool changed =
false
;
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
@@
-520,10
+516,10
@@
bool wxOGLConstraint::Evaluate()
double y3 = (double)(y + (minHeight/2.0) - (height2/2.0) - m_ySpacing);
if (!Equals(y3, constrainedObject->GetY()))
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->GetNext();
}
node = node->GetNext();
}
@@
-531,7
+527,7
@@
bool wxOGLConstraint::Evaluate()
}
case gyCONSTRAINT_MIDALIGNED_LEFT:
{
}
case gyCONSTRAINT_MIDALIGNED_LEFT:
{
- bool changed =
FALSE
;
+ bool changed =
false
;
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
@@
-540,10
+536,10
@@
bool wxOGLConstraint::Evaluate()
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->GetNext();
}
node = node->GetNext();
}
@@
-551,7
+547,7
@@
bool wxOGLConstraint::Evaluate()
}
case gyCONSTRAINT_MIDALIGNED_RIGHT:
{
}
case gyCONSTRAINT_MIDALIGNED_RIGHT:
{
- bool changed =
FALSE
;
+ bool changed =
false
;
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
@@
-560,22
+556,22
@@
bool wxOGLConstraint::Evaluate()
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->GetNext();
}
return changed;
#if 0
// two returned values ?
node = node->GetNext();
}
return changed;
#if 0
// two returned values ?
- return
FALSE
;
+ return
false
;
#endif
}
case gyCONSTRAINT_MIDALIGNED_TOP:
{
#endif
}
case gyCONSTRAINT_MIDALIGNED_TOP:
{
- bool changed =
FALSE
;
+ bool changed =
false
;
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
@@
-584,10
+580,10
@@
bool wxOGLConstraint::Evaluate()
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->GetNext();
}
node = node->GetNext();
}
@@
-595,7
+591,7
@@
bool wxOGLConstraint::Evaluate()
}
case gyCONSTRAINT_MIDALIGNED_BOTTOM:
{
}
case gyCONSTRAINT_MIDALIGNED_BOTTOM:
{
- bool changed =
FALSE
;
+ bool changed =
false
;
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
wxNode *node = m_constrainedObjects.GetFirst();
while (node)
@@
-604,10
+600,10
@@
bool wxOGLConstraint::Evaluate()
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->GetNext();
}
node = node->GetNext();
}
@@
-616,9
+612,9
@@
bool wxOGLConstraint::Evaluate()
#if 0
// default value handled in main function body
default:
#if 0
// default value handled in main function body
default:
- return
FALSE
;
+ return
false
;
#endif
}
#endif
}
- return
FALSE
;
+ return
false
;
}
}