| 504 | } |
| 505 | |
| 506 | void IDrawableModule::DrawPatchCables(bool parentMinimized, bool inFront) |
| 507 | { |
| 508 | if (mPinned) |
| 509 | ForcePosition(); |
| 510 | for (auto source : mPatchCableSources) |
| 511 | { |
| 512 | ConnectionType type = source->GetConnectionType(); |
| 513 | bool isHeld = false; |
| 514 | if (PatchCable::sActivePatchCable != nullptr) |
| 515 | isHeld = (PatchCable::sActivePatchCable->GetOwner() == source); |
| 516 | bool shouldDrawInFront = isHeld || (type != kConnectionType_Note && type != kConnectionType_Pulse && type != kConnectionType_Audio); |
| 517 | if (type == kConnectionType_Pulse) |
| 518 | { |
| 519 | for (auto const cable : source->GetPatchCables()) |
| 520 | { |
| 521 | if (cable->GetTarget() != nullptr && |
| 522 | dynamic_cast<IUIControl*>(cable->GetTarget()) != nullptr) |
| 523 | { |
| 524 | shouldDrawInFront = true; |
| 525 | break; |
| 526 | } |
| 527 | } |
| 528 | } |
| 529 | if ((inFront && !shouldDrawInFront) || (!inFront && shouldDrawInFront)) |
| 530 | continue; |
| 531 | |
| 532 | source->UpdatePosition(parentMinimized); |
| 533 | source->DrawCables(parentMinimized); |
| 534 | } |
| 535 | } |
| 536 | |
| 537 | //static |
| 538 | ofColor IDrawableModule::GetColor(ModuleCategory type) |
nothing calls this directly
no test coverage detected