MCPcopy Create free account
hub / github.com/BespokeSynth/BespokeSynth / ButtonClicked

Method ButtonClicked

Source/FloatSliderLFOControl.cpp:442–463  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

440}
441
442void FloatSliderLFOControl::ButtonClicked(ClickButton* button, double time)
443{
444 if (button == mPinButton)
445 {
446 if (!mPinned)
447 {
448 mPinned = true;
449 TheSynth->AddDynamicModule(this);
450 TheSynth->PopModalFocusItem();
451
452 SetName(GetUniqueName("lfo", TheSynth->GetModuleNames<FloatSliderLFOControl*>()).c_str());
453
454 if (mTargetCable == nullptr)
455 {
456 mTargetCable = new PatchCableSource(this, kConnectionType_Modulator);
457 mTargetCable->SetModulatorOwner(this);
458 AddPatchCableSource(mTargetCable);
459 mTargetCable->SetTarget(GetSliderTarget());
460 }
461 }
462 }
463}
464
465void FloatSliderLFOControl::SaveLayout(ofxJSONElement& moduleInfo)
466{

Callers

nothing calls this directly

Calls 5

GetUniqueNameFunction · 0.85
AddDynamicModuleMethod · 0.80
PopModalFocusItemMethod · 0.80
SetModulatorOwnerMethod · 0.80
SetTargetMethod · 0.45

Tested by

no test coverage detected