1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00

Projucer: Check if component position is relative to any other components when filling out the setBounds() code in the GUI builder

This commit is contained in:
ed 2018-12-13 10:12:50 +00:00
parent 166e1d1185
commit 7f4b094018
3 changed files with 11 additions and 1 deletions

View file

@ -554,6 +554,15 @@ bool ComponentLayout::dependsOnComponentForRelativePos (Component* comp, Compone
return false;
}
bool ComponentLayout::isComponentPositionRelative (Component* comp) const
{
for (int i = 0; i < getNumComponents(); ++i)
if (dependsOnComponentForRelativePos (comp, getComponent (i)))
return true;
return false;
}
const int menuIdBase = 0x63240000;
PopupMenu ComponentLayout::getRelativeTargetMenu (Component* comp, int whichDimension) const