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

Method GetModuleDimensions

Source/SongBuilder.cpp:404–424  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

402}
403
404void SongBuilder::GetModuleDimensions(float& width, float& height)
405{
406 width = kLeftMarginX + kSceneTabWidth + (int)mTargets.size() * (kColumnWidth + kSpacingX) + 3;
407 if (ShowSongSequencer())
408 width += kSongSequencerWidth;
409 height = kGridStartY + kTargetTabHeightTop + kTargetTabHeightBottom + kSpacingY + (int)mScenes.size() * (kRowHeight + kSpacingY) + 3;
410
411 if (ShowSongSequencer())
412 {
413 for (int i = 0; i < kMaxSequencerScenes; ++i)
414 {
415 if (i == kMaxSequencerScenes - 1 || mSequencerSceneId[i] < 0) //end of sequence
416 {
417 ofRectangle rect = mSequencerSceneSelector[i]->GetRect(K(local));
418 if (rect.getMaxY() + 3 > height)
419 height = rect.getMaxY() + 3;
420 break;
421 }
422 }
423 }
424}
425
426void SongBuilder::PostRepatch(PatchCableSource* cable, bool fromUserClick)
427{

Callers

nothing calls this directly

Calls 3

sizeMethod · 0.80
getMaxYMethod · 0.80
GetRectMethod · 0.45

Tested by

no test coverage detected