1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-02-02 03:20:06 +00:00

Created a new class Component::SafePointer that keeps a pointer to a component and automatically nulls it if the component is deleted - this makes it a much more elegant replacement for the old ComponentDeletionWatcher class. Removed Component::getComponentUnderMouse(), which doesn't fit with multi-touch interfaces - for similar functionality, use the Desktop::getMouseInputSource() methods to find out what MouseInputSources are available, and ask them about the component they are over or dragging.

This commit is contained in:
Julian Storer 2010-02-25 22:33:44 +00:00
parent bc5a7a6b7e
commit 5fecb8a353
49 changed files with 1251 additions and 1152 deletions

View file

@ -111,7 +111,7 @@ public:
{
const ScopedLockType lock (getLock());
return (((unsigned int) index) < (unsigned int) numUsed) ? data.elements [index]
: (ObjectClass*) 0;
: static_cast <ObjectClass*> (0);
}
/** Returns a pointer to the object at this index in the array, without checking whether the index is in-range.
@ -135,7 +135,7 @@ public:
{
const ScopedLockType lock (getLock());
return numUsed > 0 ? data.elements [0]
: (ObjectClass*) 0;
: static_cast <ObjectClass*> (0);
}
/** Returns a pointer to the last object in the array.
@ -147,7 +147,7 @@ public:
{
const ScopedLockType lock (getLock());
return numUsed > 0 ? data.elements [numUsed - 1]
: (ObjectClass*) 0;
: static_cast <ObjectClass*> (0);
}
//==============================================================================