MCPcopy Create free account
hub / github.com/DISTRHO/Cardinal / createModuleWidgetFromEngineLoad

Method createModuleWidgetFromEngineLoad

include/helpers.hpp:81–96  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

79 }
80
81 app::ModuleWidget* createModuleWidgetFromEngineLoad(engine::Module* const m) override
82 {
83 DISTRHO_SAFE_ASSERT_RETURN(m != nullptr, nullptr);
84 DISTRHO_SAFE_ASSERT_RETURN(m->model == this, nullptr);
85
86 TModule* const tm = dynamic_cast<TModule*>(m);
87 DISTRHO_SAFE_ASSERT_RETURN(tm != nullptr, nullptr);
88
89 TModuleWidget* const tmw = new TModuleWidget(tm);
90 DISTRHO_SAFE_ASSERT_RETURN(tmw->module == m, nullptr);
91 tmw->setModel(this);
92
93 widgets[m] = tmw;
94 widgetNeedsDeletion[m] = true;
95 return tmw;
96 }
97
98 void removeCachedModuleWidget(engine::Module* const m) override
99 {

Callers 1

json_array_foreachFunction · 0.80

Calls 1

setModelMethod · 0.80

Tested by

no test coverage detected