95 void startDragging (
const var& sourceDescription,
98 bool allowDraggingToOtherJuceWindows =
false,
99 const Point<int>* imageOffsetFromMouse =
nullptr,
102 [[deprecated (
"This overload does not allow the image's scale to be specified. Use the other overload of startDragging instead.")]]
103 void startDragging (
const var& sourceDescription,
106 bool allowDraggingToOtherJuceWindows =
false,
107 const Point<int>* imageOffsetFromMouse =
nullptr,
110 startDragging (sourceDescription,
113 allowDraggingToOtherJuceWindows,
114 imageOffsetFromMouse,
115 inputSourceCausingDrag);
119 bool isDragAndDropActive()
const;
122 int getNumCurrentDrags()
const;
134 var getCurrentDragDescription()
const;
140 var getDragDescriptionForIndex (
int index)
const;
149 void setCurrentDragImage (
const ScaledImage& newImage);
151 [[deprecated (
"This overload does not allow the image's scale to be specified. Use the other overload of setCurrentDragImage instead.")]]
152 void setCurrentDragImage (
const Image& newImage) { setCurrentDragImage (
ScaledImage (newImage)); }
158 void setDragImageForIndex (
int index,
const ScaledImage& newImage);
160 [[deprecated (
"This overload does not allow the image's scale to be specified. Use the other overload of setDragImageForIndex instead.")]]
161 void setDragImageForIndex (
int index,
const Image& newImage) { setDragImageForIndex (index, ScaledImage (newImage)); }
173 static DragAndDropContainer* findParentDragContainerFor (Component* childComponent);
195 static bool performExternalDragDropOfFiles (
const StringArray& files,
bool canMoveFiles,
196 Component* sourceComponent =
nullptr,
215 static bool performExternalDragDropOfText (
const String& text, Component* sourceComponent =
nullptr,
232 virtual bool shouldDropFilesWhenDraggedExternally (
const DragAndDropTarget::SourceDetails& sourceDetails,
233 StringArray& files,
bool& canMoveFiles);
246 virtual bool shouldDropTextWhenDraggedExternally (
const DragAndDropTarget::SourceDetails& sourceDetails,
250 virtual void dragOperationStarted (
const DragAndDropTarget::SourceDetails&);
253 virtual void dragOperationEnded (
const DragAndDropTarget::SourceDetails&);
257 class DragImageComponent;
258 OwnedArray<DragImageComponent> dragImageComponents;
260 const MouseInputSource* getMouseInputSourceForDrag (Component* sourceComponent,
const MouseInputSource* inputSourceCausingDrag);
261 bool isAlreadyDragging (Component* sourceComponent)
const noexcept;