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

Function createIndexPtrSubmenuItem

include/helpers.hpp:414–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

412*/
413template <typename T>
414ui::MenuItem* createIndexPtrSubmenuItem(std::string text, std::vector<std::string> labels, T* ptr) {
415 return createIndexSubmenuItem(text, labels,
416 [=]() {
417 return ptr ? *ptr : 0;
418 },
419 [=](size_t index) {
420 if (ptr)
421 *ptr = T(index);
422 }
423 );
424}
425
426
427} // namespace rack

Callers 2

appendContextMenuMethod · 0.85
onActionMethod · 0.85

Calls 1

createIndexSubmenuItemFunction · 0.85

Tested by

no test coverage detected