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

Method editMenuCopy

Source/UIComponents/CtrlrPanel/CtrlrPanelCanvas.cpp:271–291  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

269}
270
271void CtrlrPanelCanvas::editMenuCopy(const MouseEvent *e)
272{
273 if (getOwner().getSelection() == nullptr)
274 return;
275
276 ValueTree clipboardTree(Ids::uiPanelClipboardTree);
277 RectangleList<int> list;
278
279 for (int i=0; i<getOwner().getSelection()->getNumSelected(); i++)
280 {
281 CtrlrModulator &m = getOwner().getSelection()->getSelectedItem(i)->getOwner();
282 ValueTree modulatorTreeCopy = m.getModulatorTree().createCopy();
283 modulatorTreeCopy.removeProperty(Ids::vstIndex, nullptr);
284 clipboardTree.addChild (modulatorTreeCopy, -1, nullptr);
285
286 list.add (m.getComponent()->getBounds());
287 }
288
289 clipboardTree.setProperty ("selectionRect", list.getBounds().toString(),0);
290 SystemClipboard::copyTextToClipboard (XML2STR(clipboardTree));
291}
292
293void CtrlrPanelCanvas::cut()
294{

Callers

nothing calls this directly

Calls 12

getSelectionMethod · 0.80
getNumSelectedMethod · 0.80
getSelectedItemMethod · 0.80
getOwnerMethod · 0.45
createCopyMethod · 0.45
removePropertyMethod · 0.45
addChildMethod · 0.45
addMethod · 0.45
getBoundsMethod · 0.45
getComponentMethod · 0.45
setPropertyMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected