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

Changed the var class to be able to hold any ReferenceCountedObject rather than just a DynamicObject. Altered the drag-and-drop classes to use a var instead of a String as the drag description. This affects the getDragSourceDescription() methods in the TreeViewItem, ListBoxModel and TableListBoxModel classes, which now return a var instead of a String.

This commit is contained in:
Julian Storer 2011-04-14 20:13:12 +01:00
parent f4c4f310e1
commit e9bdd1d637
23 changed files with 458 additions and 481 deletions

View file

@ -124,9 +124,9 @@ public:
if (item != nullptr && e.getMouseDownX() >= pos.getX())
{
const String dragDescription (item->getDragSourceDescription());
const var dragDescription (item->getDragSourceDescription());
if (dragDescription.isNotEmpty())
if (! (dragDescription.isVoid() || (dragDescription.isString() && dragDescription.toString().isEmpty())))
{
DragAndDropContainer* const dragContainer
= DragAndDropContainer::findParentDragContainerFor (this);
@ -1291,9 +1291,9 @@ const String TreeViewItem::getTooltip()
return String::empty;
}
const String TreeViewItem::getDragSourceDescription()
const var TreeViewItem::getDragSourceDescription()
{
return String::empty;
return var::null;
}
bool TreeViewItem::isInterestedInFileDrag (const StringArray&)