MCPcopy Create free account
hub / github.com/VCVRack/Rack / appendMidiDriverMenu

Function appendMidiDriverMenu

src/app/MidiDisplay.cpp:18–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16};
17
18static void appendMidiDriverMenu(ui::Menu* menu, midi::Port* port) {
19 if (!port)
20 return;
21
22 for (int driverId : midi::getDriverIds()) {
23 MidiDriverValueItem* item = new MidiDriverValueItem;
24 item->port = port;
25 item->driverId = driverId;
26 item->text = midi::getDriver(driverId)->getName();
27 item->rightText = CHECKMARK(item->driverId == port->getDriverId());
28 menu->addChild(item);
29 }
30}
31
32void MidiDriverChoice::onAction(const ActionEvent& e) {
33 ui::Menu* menu = createMenu();

Callers 3

onActionMethod · 0.85
createChildMenuMethod · 0.85
appendMidiMenuFunction · 0.85

Calls 5

addChildMethod · 0.80
getDriverIdsFunction · 0.50
getDriverFunction · 0.50
getNameMethod · 0.45
getDriverIdMethod · 0.45

Tested by

no test coverage detected