| 728 | } |
| 729 | |
| 730 | void 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 | |
| 761 | void GetInfoCommand::ExploreWindows( const CommandContext &context, |
nothing calls this directly
no test coverage detected