MCPcopy Create free account
hub / github.com/asb2m10/dexed / programRightClicked

Method programRightClicked

Source/CartManager.cpp:377–407  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

375}
376
377void CartManager::programRightClicked(ProgramListBox *source, int pos) {
378 PopupMenu menu;
379
380 menu.addItem(1000, "Send program '" + source->programNames[pos] + "' to DX7");
381
382 if ( source == activeCart.get() )
383 menu.addItem(1010, "Send current sysex cartridge to DX7");
384
385 switch(menu.show()) {
386 case 1000:
387 uint8_t unpackPgm[161];
388
389 if ( source == activeCart.get() ) {
390 mainWindow->processor->currentCart.unpackProgram(unpackPgm, pos);
391 } else {
392 source->getCurrentCart().unpackProgram(unpackPgm, pos);
393 }
394
395 if ( mainWindow->processor->sysexComm.isOutputActive() ) {
396 uint8_t msg[163];
397 exportSysexPgm(msg, unpackPgm);
398 msg[2] |= mainWindow->processor->sysexComm.getChl();
399 mainWindow->processor->sysexComm.send(MidiMessage(msg, 163));
400 }
401 break;
402
403 case 1010:
404 mainWindow->processor->sendCurrentSysexCartridge();
405 break;
406 }
407}
408
409void CartManager::programDragged(ProgramListBox *destListBox, int dest, char *packedPgm) {
410 if ( destListBox == activeCart.get() ) {

Callers 1

mouseDownMethod · 0.80

Calls 7

exportSysexPgmFunction · 0.85
getMethod · 0.80
unpackProgramMethod · 0.80
isOutputActiveMethod · 0.80
getChlMethod · 0.80
sendMethod · 0.80

Tested by

no test coverage detected