1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-10 23:44:24 +00:00
This commit is contained in:
jules 2007-09-27 08:36:37 +00:00
parent 8086f0148a
commit 579cf060b0
2 changed files with 22 additions and 3 deletions

View file

@ -90,9 +90,11 @@ public:
}
//==============================================================================
bool mightContainSubItems() { return isDirectory; }
const String getUniqueName() const { return file.getFullPathName(); }
int getItemHeight() const { return 22; }
bool mightContainSubItems() { return isDirectory; }
const String getUniqueName() const { return file.getFullPathName(); }
int getItemHeight() const { return 22; }
const String getDragSourceDescription() { return owner.getDragAndDropDescription(); }
void itemOpennessChanged (bool isNowOpen)
{
@ -271,5 +273,9 @@ void FileTreeComponent::scrollToTop()
getViewport()->getVerticalScrollBar()->setCurrentRangeStart (0);
}
void FileTreeComponent::setDragAndDropDescription (const String& description) throw()
{
dragAndDropDescription = description;
}
END_JUCE_NAMESPACE

View file

@ -80,10 +80,23 @@ public:
/** Scrolls the list to the top. */
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
private:
String dragAndDropDescription;
FileTreeComponent (const FileTreeComponent&);
const FileTreeComponent& operator= (const FileTreeComponent&);
};