1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2008-05-18 21:10:35 +00:00
parent 671de59be3
commit e08ebbf2e6
111 changed files with 1232 additions and 1461 deletions

View file

@ -121,7 +121,7 @@ public:
StringArray lines;
lines.addLines (c->getComponentProperty (T("items"), false));
int id = 1;
int itemId = 1;
for (int i = 0; i < lines.size(); ++i)
{
@ -129,7 +129,7 @@ public:
s << memberVariableName << "->addSeparator();\n";
else
s << memberVariableName << "->addItem ("
<< quotedString (lines[i]) << ", " << id++ << ");\n";
<< quotedString (lines[i]) << ", " << itemId++ << ");\n";
}
if (needsCallback (component))
@ -169,14 +169,14 @@ public:
lines.addLines (c->getComponentProperty (T("items"), false));
c->clear();
int id = 1;
int itemId = 1;
for (int i = 0; i < lines.size(); ++i)
{
if (lines[i].trim().isEmpty())
c->addSeparator();
else
c->addItem (lines[i], id++);
c->addItem (lines[i], itemId++);
}
}

View file

@ -224,15 +224,15 @@ int64 ComponentTypeHandler::getComponentId (Component* comp)
if (comp == 0)
return 0;
int64 id = comp->getComponentProperty (T("jucerCompId"), false).getHexValue64();
int64 compId = comp->getComponentProperty (T("jucerCompId"), false).getHexValue64();
if (id == 0)
if (compId == 0)
{
id = Random::getSystemRandom().nextInt64();
setComponentId (comp, id);
compId = Random::getSystemRandom().nextInt64();
setComponentId (comp, compId);
}
return id;
return compId;
}
void ComponentTypeHandler::setComponentId (Component* comp, const int64 newID)

View file

@ -463,18 +463,18 @@ Component* ComponentLayout::getComponentRelativePosTarget (Component* comp, int
if (pe != 0)
{
int64 id;
int64 compId;
if (whichDimension == 0)
id = pe->getPosition().relativeToX;
compId = pe->getPosition().relativeToX;
else if (whichDimension == 1)
id = pe->getPosition().relativeToY;
compId = pe->getPosition().relativeToY;
else if (whichDimension == 2)
id = pe->getPosition().relativeToW;
compId = pe->getPosition().relativeToW;
else
id = pe->getPosition().relativeToH;
compId = pe->getPosition().relativeToH;
return findComponentWithId (id);
return findComponentWithcompId (id);
}
else
{
@ -495,7 +495,7 @@ void ComponentLayout::setComponentRelativeTarget (Component* comp, int whichDime
if (compToBeRelativeTo != getComponentRelativePosTarget (comp, whichDimension)
&& (compToBeRelativeTo == 0 || ! dependsOnComponentForRelativePos (compToBeRelativeTo, comp)))
{
const int64 id = ComponentTypeHandler::getComponentId (compToBeRelativeTo);
const int64 compId = ComponentTypeHandler::getComponentId (compToBeRelativeTo);
Rectangle oldBounds (comp->getBounds());
RelativePositionedRectangle pos;
@ -511,13 +511,13 @@ void ComponentLayout::setComponentRelativeTarget (Component* comp, int whichDime
}
if (whichDimension == 0)
pos.relativeToX = id;
pos.relativeToX = compId;
else if (whichDimension == 1)
pos.relativeToY = id;
pos.relativeToY = compId;
else if (whichDimension == 2)
pos.relativeToW = id;
pos.relativeToW = compId;
else if (whichDimension == 3)
pos.relativeToH = id;
pos.relativeToH = compId;
if (pe != 0)
{