| 841 | } |
| 842 | |
| 843 | hise::MacroControlledObject::ModulationPopupData::Ptr ScriptModulationMatrix::TargetDataBase::getModulationData() |
| 844 | { |
| 845 | MacroControlledObject::ModulationPopupData::Ptr newData = new MacroControlledObject::ModulationPopupData(); |
| 846 | |
| 847 | newData->modulationId = modId; |
| 848 | |
| 849 | for (auto s : parent->sourceData) |
| 850 | newData->sources.add(s->mod->getId()); |
| 851 | |
| 852 | WeakReference<ScriptModulationMatrix> safeParent(parent.get()); |
| 853 | WeakReference<TargetDataBase> safeThis(this); |
| 854 | |
| 855 | if (parent->editCallback) |
| 856 | { |
| 857 | newData->editCallback = [safeParent](String name) |
| 858 | { |
| 859 | if (safeParent != nullptr) |
| 860 | safeParent->editCallback.call1(name); |
| 861 | }; |
| 862 | } |
| 863 | |
| 864 | newData->queryFunction = [safeThis](int index, bool checkTicked) |
| 865 | { |
| 866 | if (safeThis != nullptr) |
| 867 | return safeThis->queryFunction(index, checkTicked); |
| 868 | |
| 869 | return false; |
| 870 | }; |
| 871 | |
| 872 | newData->toggleFunction = [safeThis](int index, bool value) |
| 873 | { |
| 874 | if (safeThis != nullptr) |
| 875 | { |
| 876 | auto source = safeThis->parent->sourceData[index]->mod->getId(); |
| 877 | |
| 878 | safeThis->parent->connect(source, safeThis->modId, value); |
| 879 | } |
| 880 | }; |
| 881 | |
| 882 | return newData; |
| 883 | } |
| 884 | |
| 885 | void ScriptModulationMatrix::TargetDataBase::verifyProperty(const var& json, const Identifier& id) |
| 886 | { |
no test coverage detected