MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / getDragSourceDescription

Method getDragSourceDescription

Source/UIComponents/CtrlrValueTreeEditor.cpp:85–112  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

83}
84
85var CtrlrValueTreeEditorItem::getDragSourceDescription ()
86{
87 Array <ValueTree> selectedTreeItems;
88 String returnValue;
89
90 if (getOwnerView())
91 {
92 for (int i=0; i<getOwnerView()->getNumSelectedItems(); i++)
93 {
94 CtrlrValueTreeEditorItem *item = dynamic_cast<CtrlrValueTreeEditorItem*>(getOwnerView()->getSelectedItem(i));
95 selectedTreeItems.add (item->getTree());
96 }
97 }
98
99 if ((returnValue = provider.getDragSourceDescription(selectedTreeItems)) != "")
100 {
101 return (returnValue);
102 }
103 else
104 {
105 for (int i=0; i<selectedTreeItems.size(); i++)
106 {
107 returnValue << selectedTreeItems[i].getType().toString() + ";";
108 }
109 }
110
111 return (returnValue);
112}
113
114bool CtrlrValueTreeEditorItem::isInterestedInDragSource (const DragAndDropTarget::SourceDetails &dragSourceDetails)
115{

Callers

nothing calls this directly

Calls 6

getOwnerViewFunction · 0.85
getSelectedItemMethod · 0.80
addMethod · 0.45
sizeMethod · 0.45
toStringMethod · 0.45
getTypeMethod · 0.45

Tested by

no test coverage detected