MCPcopy Create free account
hub / github.com/audacity/audacity / Children

Method Children

src/TrackPanel.cpp:1459–1486  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1457struct Subgroup final : TrackPanelGroup {
1458 explicit Subgroup(TrackPanel &panel) : mPanel{ panel } {}
1459 Subdivision Children(const wxRect &rect) override
1460 {
1461 const auto &viewInfo = *mPanel.GetViewInfo();
1462 wxCoord yy = -viewInfo.vpos;
1463 Refinement refinement;
1464
1465 auto &tracks = *mPanel.GetTracks();
1466 if (!tracks.empty())
1467 refinement.emplace_back( yy, EmptyCell::Instance() ),
1468 yy += kTopMargin;
1469
1470 for (const auto pTrack : tracks) {
1471 wxCoord height = 0;
1472 for (auto pChannel : pTrack->Channels()) {
1473 auto &view = ChannelView::Get(*pChannel);
1474 height += view.GetHeight();
1475 }
1476 refinement.emplace_back( yy,
1477 std::make_shared<ResizingChannelGroup>(
1478 pTrack->SharedPointer(), viewInfo.GetLeftOffset())
1479 );
1480 yy += height;
1481 }
1482
1483 refinement.emplace_back(std::max(0, yy), mPanel.GetBackgroundCell());
1484
1485 return { Axis::Y, std::move(refinement) };
1486 }
1487 TrackPanel &mPanel;
1488};
1489

Callers 2

VisitMethod · 0.45
FindCellMethod · 0.45

Calls 9

GetFunction · 0.85
maxFunction · 0.85
moveFunction · 0.85
ChannelsMethod · 0.80
GetHeightMethod · 0.80
GetLeftOffsetMethod · 0.80
GetBackgroundCellMethod · 0.80
InstanceClass · 0.50
emptyMethod · 0.45

Tested by

no test coverage detected