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

Method AudioFileWidget

plugins/Cardinal/src/AudioFile.cpp:538–559  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

536 float lastPosition = 0.0f;
537
538 AudioFileWidget(CarlaInternalPluginModule* const m)
539 : module(m)
540 {
541 setModule(module);
542 setPanel(APP->window->loadSvg(asset::plugin(pluginInstance, "res/AudioFile.svg")));
543
544 addChild(createWidget<ThemedScrew>(Vec(RACK_GRID_WIDTH, 0)));
545 addChild(createWidget<ThemedScrew>(Vec(box.size.x - 4 * RACK_GRID_WIDTH, 0)));
546 addChild(createWidget<ThemedScrew>(Vec(RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
547 addChild(createWidget<ThemedScrew>(Vec(box.size.x - 2 * RACK_GRID_WIDTH, RACK_GRID_HEIGHT - RACK_GRID_WIDTH)));
548
549 addOutput(createOutput<PJ301MPort>(Vec(startX_Out, startY_list * 0.5f - padding + 2.0f), module, 0));
550 addOutput(createOutput<PJ301MPort>(Vec(startX_Out, startY_list * 0.5f + 2.0f), module, 1));
551
552 if (m != nullptr)
553 {
554 AudioFileListWidget* const listw = new AudioFileListWidget(m);
555 listw->box.pos = Vec(0, startY_list);
556 listw->box.size = Vec(box.size.x, fileListHeight);
557 addChild(listw);
558 }
559 }
560
561 void drawLayer(const DrawArgs& args, int layer) override
562 {

Callers

nothing calls this directly

Calls 3

VecClass · 0.85
loadSvgMethod · 0.80
pluginFunction · 0.50

Tested by

no test coverage detected