mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
parent
8086f0148a
commit
579cf060b0
2 changed files with 22 additions and 3 deletions
|
|
@ -90,9 +90,11 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
bool mightContainSubItems() { return isDirectory; }
|
bool mightContainSubItems() { return isDirectory; }
|
||||||
const String getUniqueName() const { return file.getFullPathName(); }
|
const String getUniqueName() const { return file.getFullPathName(); }
|
||||||
int getItemHeight() const { return 22; }
|
int getItemHeight() const { return 22; }
|
||||||
|
|
||||||
|
const String getDragSourceDescription() { return owner.getDragAndDropDescription(); }
|
||||||
|
|
||||||
void itemOpennessChanged (bool isNowOpen)
|
void itemOpennessChanged (bool isNowOpen)
|
||||||
{
|
{
|
||||||
|
|
@ -271,5 +273,9 @@ void FileTreeComponent::scrollToTop()
|
||||||
getViewport()->getVerticalScrollBar()->setCurrentRangeStart (0);
|
getViewport()->getVerticalScrollBar()->setCurrentRangeStart (0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FileTreeComponent::setDragAndDropDescription (const String& description) throw()
|
||||||
|
{
|
||||||
|
dragAndDropDescription = description;
|
||||||
|
}
|
||||||
|
|
||||||
END_JUCE_NAMESPACE
|
END_JUCE_NAMESPACE
|
||||||
|
|
|
||||||
|
|
@ -80,10 +80,23 @@ public:
|
||||||
/** Scrolls the list to the top. */
|
/** Scrolls the list to the top. */
|
||||||
void scrollToTop();
|
void scrollToTop();
|
||||||
|
|
||||||
|
/** Setting a name for this allows tree items to be dragged.
|
||||||
|
|
||||||
|
The string that you pass in here will be returned by the getDragSourceDescription()
|
||||||
|
of the items in the tree. For more info, see TreeViewItem::getDragSourceDescription().
|
||||||
|
*/
|
||||||
|
void setDragAndDropDescription (const String& description) throw();
|
||||||
|
|
||||||
|
/** Returns the last value that was set by setDragAndDropDescription().
|
||||||
|
*/
|
||||||
|
const String& getDragAndDropDescription() const throw() { return dragAndDropDescription; }
|
||||||
|
|
||||||
//==============================================================================
|
//==============================================================================
|
||||||
juce_UseDebuggingNewOperator
|
juce_UseDebuggingNewOperator
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
String dragAndDropDescription;
|
||||||
|
|
||||||
FileTreeComponent (const FileTreeComponent&);
|
FileTreeComponent (const FileTreeComponent&);
|
||||||
const FileTreeComponent& operator= (const FileTreeComponent&);
|
const FileTreeComponent& operator= (const FileTreeComponent&);
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue