Browse Source

Changed DragAndDropContainer::getCurrentDragDescription() to return a var.

tags/2021-05-28
jules 12 years ago
parent
commit
4d7aaace23
2 changed files with 6 additions and 6 deletions
  1. +2
    -2
      modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp
  2. +4
    -4
      modules/juce_gui_basics/mouse/juce_DragAndDropContainer.h

+ 2
- 2
modules/juce_gui_basics/mouse/juce_DragAndDropContainer.cpp View File

@@ -417,10 +417,10 @@ bool DragAndDropContainer::isDragAndDropActive() const
return dragImageComponent != nullptr; return dragImageComponent != nullptr;
} }
String DragAndDropContainer::getCurrentDragDescription() const
var DragAndDropContainer::getCurrentDragDescription() const
{ {
return dragImageComponent != nullptr ? currentDragDesc return dragImageComponent != nullptr ? currentDragDesc
: String::empty;
: var();
} }
DragAndDropContainer* DragAndDropContainer::findParentDragContainerFor (Component* c) DragAndDropContainer* DragAndDropContainer::findParentDragContainerFor (Component* c)


+ 4
- 4
modules/juce_gui_basics/mouse/juce_DragAndDropContainer.h View File

@@ -97,12 +97,12 @@ public:
/** Returns the description of the thing that's currently being dragged. /** Returns the description of the thing that's currently being dragged.
If nothing's being dragged, this will return an empty string, otherwise it's the
string that was passed into startDragging().
If nothing's being dragged, this will return a null var, otherwise it'll return
the var that was passed into startDragging().
@see startDragging @see startDragging
*/ */
String getCurrentDragDescription() const;
var getCurrentDragDescription() const;
/** Utility to find the DragAndDropContainer for a given Component. /** Utility to find the DragAndDropContainer for a given Component.
@@ -172,7 +172,7 @@ private:
class DragImageComponent; class DragImageComponent;
friend class DragImageComponent; friend class DragImageComponent;
ScopedPointer <Component> dragImageComponent; ScopedPointer <Component> dragImageComponent;
String currentDragDesc;
var currentDragDesc;
JUCE_DEPRECATED (virtual bool shouldDropFilesWhenDraggedExternally (const String&, Component*, StringArray&, bool&)) { return false; } JUCE_DEPRECATED (virtual bool shouldDropFilesWhenDraggedExternally (const String&, Component*, StringArray&, bool&)) { return false; }


Loading…
Cancel
Save