First, thank you for the jucer, it is a really really good piece of gold.
I’ve converted the project to vs6.0 if you want it (and fixed the 19 errors, mostly for(int i <= redefinition and findSomethingComponent changed to findSomethingComponent((MainWindow*)0))
However there is a small programming mistake in Font’s getTypefaceName which tries to access private typefaceName of element. I’ve added element->getTypefaceName
Good luck…
PS: I have a compiled Win32 binary if you want it…
‘subtracted from parent width’ appears to not work when anchored to the centre of the component- the width given is just the value intended for subtraction
there’s a bug in one of the utility functions for code generation that causes the thing i vaguely mentioned above (i’d have posted this yesterday but the internet has only just come back to life for me!)
static void positionToCode (const PositionedRectangle& position,
String& x, String& y, String& w, String& h)
{
// width
if (position.getWidthMode() == PositionedRectangle::proportionalSize)
w << "proportionOfWidth (" << valueToFloat (position.getWidth()) << ")";
// -----------------------------------------------------------------
// This part isn't in the original version at all
else if (position.getWidthMode() == PositionedRectangle::parentSizeMinusAbsolute)
w << "getWidth () - " << roundDoubleToInt (position.getWidth());
// -----------------------------------------------------------------
else
w << roundDoubleToInt (position.getWidth());
// height
if (position.getHeightMode() == PositionedRectangle::proportionalSize)
h << "proportionOfHeight (" << valueToFloat (position.getHeight()) << ")";
// -----------------------------------------------------------------
// This part isn't in the original version at all
else if (position.getHeightMode() == PositionedRectangle::parentSizeMinusAbsolute)
h << "getHeight () - " << roundDoubleToInt (position.getHeight());
// -----------------------------------------------------------------
else
h << roundDoubleToInt (position.getHeight());
// x-pos
if (position.getPositionModeX() == PositionedRectangle::proportionOfParentSize)
x << "proportionOfWidth (" << valueToFloat (position.getX()) << ")";
else if (position.getPositionModeX() == PositionedRectangle::absoluteFromParentTopLeft)
x << roundDoubleToInt (position.getX());
else if (position.getPositionModeX() == PositionedRectangle::absoluteFromParentBottomRight)
{
x << "getWidth()";
const int d = roundDoubleToInt (position.getX());
if (d != 0)
x << " - " << d;
}
else if (position.getPositionModeX() == PositionedRectangle::absoluteFromParentCentre)
{
x << "(getWidth() / 2)";
const int d = roundDoubleToInt (position.getX());
if (d != 0)
x << " + " << d;
}
if (w != T("0"))
{
if (position.getAnchorPointX() == PositionedRectangle::anchorAtRightOrBottom)
x << " - " << w;
else if (position.getAnchorPointX() == PositionedRectangle::anchorAtCentre)
//----------------------------------------------------
// The extra brackets protect stuff like 'getWidth()-20' from the '/2'
x << " - ((" << w << ") / 2)";
//----------------------------------------------------
}
// y-pos
if (position.getPositionModeY() == PositionedRectangle::proportionOfParentSize)
y << "proportionOfHeight (" << valueToFloat (position.getY()) << ")";
else if (position.getPositionModeY() == PositionedRectangle::absoluteFromParentTopLeft)
y << roundDoubleToInt (position.getY());
else if (position.getPositionModeY() == PositionedRectangle::absoluteFromParentBottomRight)
{
y << "getHeight()";
const int d = roundDoubleToInt (position.getY());
if (d != 0)
y << " - " << d;
}
else if (position.getPositionModeY() == PositionedRectangle::absoluteFromParentCentre)
{
y << "(getHeight() / 2)";
const int d = roundDoubleToInt (position.getY());
if (d != 0)
y << " + " << d;
}
if (h != T("0"))
{
if (position.getAnchorPointY() == PositionedRectangle::anchorAtRightOrBottom)
y << " - " << h;
else if (position.getAnchorPointY() == PositionedRectangle::anchorAtCentre)
//----------------------------------------------------
// The extra brackets protect stuff like 'getHeight()-20' from the '/2'
y << " - ((" << h << ") / 2)";
//----------------------------------------------------
}
}