Hi Jules,
I've got a BrowserFileComponent component on my interface and I would like a drop files into the FileTreeComponent but this looks very difficult to do.
When I drop items into it, I can see that TreeView::handleDrop is called:
void TreeView::handleDrop (const StringArray& files, const SourceDetails& dragSourceDetails)
{
hideDragHighlight();
InsertPoint insertPos (*this, files, dragSourceDetails);
if (insertPos.item == nullptr)
insertPos.item = rootItem;
if (insertPos.item != nullptr)
{
if (files.size() > 0)
{
if (insertPos.item->isInterestedInFileDrag (files))
insertPos.item->filesDropped (files, insertPos.insertIndex);
}
else
{
if (insertPos.item->isInterestedInDragSource (dragSourceDetails))
insertPos.item->itemDropped (dragSourceDetails, insertPos.insertIndex);
}
}
}
but isInterestedInDragSource§isInterestedInFileDrag always return false.
If I want to change this return, no other change that overriding, is it?
I though that I could easily override FileBrowerComponent and its child classes.
I first tried to overridde FileBrowerComponent but I don't manage to override the constructor as the FileBrowerComponent class inherites from FileFilter which is private...
So unless rewrite all thoses classes (FileBrowser, FileTreeComponent, FileTreeView, FileTreeItem,...), I can't see how to do that.
So my question is simply: Is there an easy way to drop items into the FileTreeComponent ?
Thanks
