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

Method CreateUIControls

Source/NoteExpressionRouter.cpp:47–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45}
46
47void NoteExpressionRouter::CreateUIControls()
48{
49 IDrawableModule::CreateUIControls();
50
51 UIBLOCK0();
52 for (int i = 0; i < kMaxDestinations; ++i)
53 {
54 TEXTENTRY(mExpressionWidget[i], ("expression" + ofToString(i)).c_str(), 30, mExpressionText[i]);
55 mDestinationCables[i] = new AdditionalNoteCable();
56 mDestinationCables[i]->SetPatchCableSource(new PatchCableSource(this, kConnectionType_Note));
57 mDestinationCables[i]->GetPatchCableSource()->SetOverrideCableDir(ofVec2f(1, 0), PatchCableSource::Side::kRight);
58 AddPatchCableSource(mDestinationCables[i]->GetPatchCableSource());
59 ofRectangle rect = mExpressionWidget[i]->GetRect(true);
60 mDestinationCables[i]->GetPatchCableSource()->SetManualPosition(rect.getMaxX() + 10, rect.y + rect.height / 2);
61 }
62 ENDUIBLOCK(mWidth, mHeight);
63 mWidth += 20;
64
65 GetPatchCableSource()->SetEnabled(false);
66}
67
68void NoteExpressionRouter::DrawModule()
69{

Callers

nothing calls this directly

Calls 9

ofToStringFunction · 0.85
ofVec2fClass · 0.85
SetPatchCableSourceMethod · 0.80
SetOverrideCableDirMethod · 0.80
SetManualPositionMethod · 0.80
getMaxXMethod · 0.80
GetPatchCableSourceMethod · 0.45
GetRectMethod · 0.45
SetEnabledMethod · 0.45

Tested by

no test coverage detected