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

Method onAction

plugins/BidooDark/plugin.cpp:3–15  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1#include "../Bidoo/src/plugin.hpp"
2
3void InstantiateExpanderItem::onAction(const event::Action &e) {
4 engine::Module* module = model->createModule();
5 APP->engine->addModule(module);
6 ModuleWidget* mw = model->createModuleWidget(module);
7 if (mw) {
8 APP->scene->rack->setModulePosNearest(mw, posit);
9 APP->scene->rack->addModule(mw);
10 history::ModuleAdd *h = new history::ModuleAdd;
11 h->name = "create expander module";
12 h->setModule(mw);
13 APP->history->push(h);
14 }
15}
16
17json_t* BidooModule::dataToJson() {
18 return json_object();

Callers

nothing calls this directly

Calls 5

addModuleMethod · 0.80
createModuleWidgetMethod · 0.80
createModuleMethod · 0.45
setModuleMethod · 0.45
pushMethod · 0.45

Tested by

no test coverage detected