mirror of
https://github.com/juce-framework/JUCE.git
synced 2026-01-10 23:44:24 +00:00
ListBox: Allow ListBoxModel to control whether items may be dragged to other windows
This commit is contained in:
parent
882c2aa01d
commit
629a3ca14b
2 changed files with 6 additions and 1 deletions
|
|
@ -168,7 +168,7 @@ public:
|
|||
if (! (dragDescription.isVoid() || (dragDescription.isString() && dragDescription.toString().isEmpty())))
|
||||
{
|
||||
isDragging = true;
|
||||
owner.startDragAndDrop (e, rowsToDrag, dragDescription, true);
|
||||
owner.startDragAndDrop (e, rowsToDrag, dragDescription, m->mayDragToExternalWindows());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -156,6 +156,11 @@ public:
|
|||
*/
|
||||
virtual var getDragSourceDescription (const SparseSet<int>& rowsToDescribe);
|
||||
|
||||
/** Called when starting a drag operation on a list row to determine whether the item may be
|
||||
dragged to other windows. Returns true by default.
|
||||
*/
|
||||
virtual bool mayDragToExternalWindows() const { return true; }
|
||||
|
||||
/** You can override this to provide tool tips for specific rows.
|
||||
@see TooltipClient
|
||||
*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue