|
|
|
@@ -69,6 +69,8 @@ public: |
|
|
|
if (current->isInterestedInDragSource (sourceDetails))
|
|
|
|
current->itemDragExit (sourceDetails);
|
|
|
|
}
|
|
|
|
|
|
|
|
owner.dragOperationEnded();
|
|
|
|
}
|
|
|
|
|
|
|
|
void paint (Graphics& g) override
|
|
|
|
@@ -164,14 +166,14 @@ public: |
|
|
|
|
|
|
|
if (sourceDetails.sourceComponent == nullptr)
|
|
|
|
{
|
|
|
|
delete this;
|
|
|
|
deleteSelf();
|
|
|
|
}
|
|
|
|
else if (! isMouseButtonDownAnywhere())
|
|
|
|
{
|
|
|
|
if (mouseDragSource != nullptr)
|
|
|
|
mouseDragSource->removeMouseListener (this);
|
|
|
|
|
|
|
|
delete this;
|
|
|
|
deleteSelf();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -180,7 +182,7 @@ public: |
|
|
|
if (key == KeyPress::escapeKey)
|
|
|
|
{
|
|
|
|
dismissWithAnimation (true);
|
|
|
|
delete this;
|
|
|
|
deleteSelf();
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -311,12 +313,17 @@ private: |
|
|
|
&& ModifierKeys::getCurrentModifiersRealtime().isAnyMouseButtonDown())
|
|
|
|
{
|
|
|
|
(new ExternalDragAndDropMessage (files, canMoveFiles))->post();
|
|
|
|
delete this;
|
|
|
|
deleteSelf();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void deleteSelf()
|
|
|
|
{
|
|
|
|
delete this;
|
|
|
|
}
|
|
|
|
|
|
|
|
void dismissWithAnimation (const bool shouldSnapBack)
|
|
|
|
{
|
|
|
|
setVisible (true);
|
|
|
|
@@ -449,6 +456,8 @@ void DragAndDropContainer::startDragging (const var& sourceDescription, |
|
|
|
if (ComponentPeer* const peer = dragImageComponent->getPeer())
|
|
|
|
peer->performAnyPendingRepaintsNow();
|
|
|
|
#endif
|
|
|
|
|
|
|
|
dragOperationStarted();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
@@ -473,6 +482,9 @@ bool DragAndDropContainer::shouldDropFilesWhenDraggedExternally (const DragAndDr |
|
|
|
return false;
|
|
|
|
}
|
|
|
|
|
|
|
|
void DragAndDropContainer::dragOperationStarted() {}
|
|
|
|
void DragAndDropContainer::dragOperationEnded() {}
|
|
|
|
|
|
|
|
//==============================================================================
|
|
|
|
DragAndDropTarget::SourceDetails::SourceDetails (const var& desc, Component* comp, Point<int> pos) noexcept
|
|
|
|
: description (desc),
|
|
|
|
|