mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-16 00:34:19 +00:00
Fixed an image resizing bug. Tweaked a couple of methods in KeyMappingEditorComponent and TableListBox to return references instead of pointers. Changed Component::contains() to take a Point rather than raw coordinates. Modernised some UI classes internally. Extended some internal graphics classes to handle affine transforms.
This commit is contained in:
parent
8b92a43b27
commit
aef3203a28
31 changed files with 1606 additions and 1767 deletions
|
|
@ -946,31 +946,19 @@ public:
|
|||
|
||||
bool contains (const Point<int>& position, bool trueIfInAChildWindow) const
|
||||
{
|
||||
int x = position.getX();
|
||||
int y = position.getY();
|
||||
|
||||
if (((unsigned int) x) >= (unsigned int) ww
|
||||
|| ((unsigned int) y) >= (unsigned int) wh)
|
||||
if (((unsigned int) position.getX()) >= (unsigned int) ww
|
||||
|| ((unsigned int) position.getY()) >= (unsigned int) wh)
|
||||
return false;
|
||||
|
||||
bool inFront = false;
|
||||
|
||||
for (int i = 0; i < Desktop::getInstance().getNumComponents(); ++i)
|
||||
for (int i = Desktop::getInstance().getNumComponents(); --i >= 0;)
|
||||
{
|
||||
Component* const c = Desktop::getInstance().getComponent (i);
|
||||
|
||||
if (inFront)
|
||||
{
|
||||
if (c->contains (x + wx - c->getScreenX(),
|
||||
y + wy - c->getScreenY()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
else if (c == getComponent())
|
||||
{
|
||||
inFront = true;
|
||||
}
|
||||
if (c == getComponent())
|
||||
break;
|
||||
|
||||
if (c->contains (position + Point<int> (wx, wy) - c->getScreenPosition()))
|
||||
return false;
|
||||
}
|
||||
|
||||
if (trueIfInAChildWindow)
|
||||
|
|
@ -988,7 +976,7 @@ public:
|
|||
return false;
|
||||
}
|
||||
|
||||
if (! XTranslateCoordinates (display, windowH, windowH, x, y, &wx, &wy, &child))
|
||||
if (! XTranslateCoordinates (display, windowH, windowH, position.getX(), position.getY(), &wx, &wy, &child))
|
||||
return false;
|
||||
|
||||
return child == None;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue