1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-14 00:14:18 +00:00

Added ownerViewChanged callback to TreeView

This commit is contained in:
jules 2015-08-20 09:52:21 +01:00
parent 962e364010
commit cf90b59e9f
2 changed files with 12 additions and 1 deletions

View file

@ -1381,6 +1381,10 @@ String TreeViewItem::getTooltip()
return String::empty;
}
void TreeViewItem::ownerViewChanged (TreeView*)
{
}
var TreeViewItem::getDragSourceDescription()
{
return var();
@ -1487,7 +1491,11 @@ void TreeViewItem::setOwnerView (TreeView* const newOwner) noexcept
ownerView = newOwner;
for (int i = subItems.size(); --i >= 0;)
subItems.getUnchecked(i)->setOwnerView (newOwner);
{
TreeViewItem* subItem = subItems.getUnchecked(i);
subItem->setOwnerView (newOwner);
subItem->ownerViewChanged (newOwner);
}
}
int TreeViewItem::getIndentX() const noexcept

View file

@ -394,6 +394,9 @@ public:
*/
virtual void itemSelectionChanged (bool isNowSelected);
/** Called when the owner view changes */
virtual void ownerViewChanged (TreeView* newOwner);
/** The item can return a tool tip string here if it wants to.
@see TooltipClient
*/