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

Method Children

src/TrackPanel.cpp:1240–1278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1238 ChannelStack(const std::shared_ptr<Track> &pTrack, wxCoord leftOffset)
1239 : mpTrack{ pTrack }, mLeftOffset{ leftOffset } {}
1240 Subdivision Children(const wxRect &rect_) override
1241 {
1242 auto rect = rect_;
1243 Refinement refinement;
1244
1245 const auto channels = mpTrack->Channels();
1246 const auto pLast = *channels.rbegin();
1247 wxCoord yy = rect.GetTop();
1248 auto heights = FindAdjustedChannelHeights(*mpTrack);
1249 auto pHeight = heights.begin();
1250 for (auto pChannel : channels) {
1251 auto &view = ChannelView::Get(*pChannel);
1252 if (auto affordance = view.GetAffordanceControls()) {
1253 Refinement hgroup {
1254 std::make_pair(mLeftOffset, affordance)
1255 };
1256 refinement
1257 .emplace_back(yy, std::make_shared<HorizontalGroup>(hgroup));
1258 yy += kAffordancesAreaHeight;
1259 }
1260
1261 auto height = *pHeight++;
1262 rect.SetTop(yy);
1263 rect.SetHeight(height - kChannelSeparatorThickness);
1264 refinement.emplace_back(yy,
1265 std::make_shared<VRulersAndChannels>(pChannel,
1266 ChannelView::Get(*pChannel).GetSubViews(rect),
1267 mLeftOffset));
1268 if (pChannel != pLast) {
1269 yy += height;
1270 refinement.emplace_back(
1271 yy - kChannelSeparatorThickness,
1272 TrackPanelResizerCell::Get(*pChannel)
1273 .shared_from_this());
1274 }
1275 }
1276
1277 return { Axis::Y, std::move(refinement) };
1278 }
1279
1280 void Draw(TrackPanelDrawingContext& context,
1281 const wxRect& rect, unsigned iPass) override

Callers

nothing calls this directly

Calls 8

GetFunction · 0.85
moveFunction · 0.85
ChannelsMethod · 0.80
rbeginMethod · 0.45
beginMethod · 0.45
GetAffordanceControlsMethod · 0.45
GetSubViewsMethod · 0.45

Tested by

no test coverage detected