further development

git-svn-id: http://moon:8086/svn/software/trunk/projects/RBM@17 b431acfa-c32f-4a4a-93f1-934dc6c82436
This commit is contained in:
2014-10-04 19:09:35 +00:00
parent b403b9776a
commit f62f1283f8
127 changed files with 2350 additions and 1235 deletions
@@ -215,13 +215,28 @@ private:
return dynamic_cast<DragAndDropTarget*> (currentlyOverComp.get());
}
static Component* findDesktopComponentBelow (Point<int> screenPos)
{
Desktop& desktop = Desktop::getInstance();
for (int i = desktop.getNumComponents(); --i >= 0;)
{
Component* c = desktop.getComponent(i);
if (Component* hit = c->getComponentAt (c->getLocalPoint (nullptr, screenPos)))
return hit;
}
return nullptr;
}
DragAndDropTarget* findTarget (Point<int> screenPos, Point<int>& relativePos,
Component*& resultComponent) const
{
Component* hit = getParentComponent();
if (hit == nullptr)
hit = Desktop::getInstance().findComponentAt (screenPos);
hit = findDesktopComponentBelow (screenPos);
else
hit = hit->getComponentAt (hit->getLocalPoint (nullptr, screenPos));
@@ -128,7 +128,7 @@ private:
SpinLock MouseCursor::SharedCursorHandle::lock;
//==============================================================================
MouseCursor::MouseCursor()
MouseCursor::MouseCursor() noexcept
: cursorHandle (nullptr)
{
}
@@ -72,10 +72,10 @@ public:
//==============================================================================
/** Creates the standard arrow cursor. */
MouseCursor();
MouseCursor() noexcept;
/** Creates one of the standard mouse cursor */
MouseCursor (StandardCursorType type);
MouseCursor (StandardCursorType);
/** Creates a custom cursor from an image.