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

Method ExploreTrackPanel

src/commands/GetInfoCommand.cpp:730–758  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

728}
729
730void GetInfoCommand::ExploreTrackPanel( const CommandContext &context,
731 wxPoint P, int depth )
732{
733 AudacityProject * pProj = &context.project;
734 auto &tp = TrackPanel::Get( *pProj );
735 wxRect panelRect{ {}, tp.GetSize() };
736 for (auto pTrack : TrackList::Get(*pProj)) {
737 for (auto pChannel : pTrack->Channels()) {
738 auto rulers = tp.FindRulerRects(*pChannel);
739 for (auto &R : rulers) {
740 if (!R.Intersects(panelRect))
741 continue;
742 R.SetPosition( R.GetPosition() + P );
743 context.StartStruct();
744 context.AddItem( depth, "depth" );
745 context.AddItem( "VRuler", "label" );
746 context.StartField("box");
747 context.StartArray();
748 context.AddItem( R.GetLeft() );
749 context.AddItem( R.GetTop() );
750 context.AddItem( R.GetRight() );
751 context.AddItem( R.GetBottom() );
752 context.EndArray();
753 context.EndField();
754 context.EndStruct();
755 }
756 }
757 }
758}
759
760
761void GetInfoCommand::ExploreWindows( const CommandContext &context,

Callers

nothing calls this directly

Calls 14

GetFunction · 0.85
ChannelsMethod · 0.80
FindRulerRectsMethod · 0.80
IntersectsMethod · 0.80
SetPositionMethod · 0.80
GetRightMethod · 0.80
GetSizeMethod · 0.45
StartStructMethod · 0.45
AddItemMethod · 0.45
StartFieldMethod · 0.45
StartArrayMethod · 0.45
EndArrayMethod · 0.45

Tested by

no test coverage detected