1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 00:29:41 +02:00

Remove friends from TrackPanel

This commit is contained in:
Paul Licameli 2019-07-29 00:06:08 -04:00
parent 529e1b2b38
commit 7c4b624388
3 changed files with 3 additions and 12 deletions

View File

@ -211,13 +211,8 @@ protected:
bool mRedrawAfterStop;
friend class TrackPanelAx;
protected:
// The screenshot class needs to access internals
friend class ScreenshotCommand;
SelectedRegion mLastDrawnSelectedRegion {};
protected:
@ -231,10 +226,6 @@ protected:
unsigned refreshResult) override;
void UpdateStatusMessage( const wxString &status ) override;
// friending GetInfoCommand allow automation to get sizes of the
// tracks, track control panel and such.
friend class GetInfoCommand;
};
// A predicate class

View File

@ -718,7 +718,7 @@ void GetInfoCommand::ExploreTrackPanel( const CommandContext &context,
{
AudacityProject * pProj = &context.project;
auto &tp = TrackPanel::Get( *pProj );
auto &viewInfo = *tp.mViewInfo;
auto &viewInfo = ViewInfo::Get( *pProj );
wxRect trackRect = pWin->GetRect();

View File

@ -720,7 +720,7 @@ wxRect ScreenshotCommand::GetScreenRect(){
wxRect ScreenshotCommand::GetPanelRect(TrackPanel * panel){
//AdornedRulerPanel *ruler = panel->mRuler;
int h = panel->mRuler->GetRulerHeight();
int h = panel->GetRuler()->GetRulerHeight();
int x = 0, y = -h;
int width, height;
@ -819,7 +819,7 @@ bool ScreenshotCommand::Apply(const CommandContext & context)
return false;
TrackPanel *panel = &TrackPanel::Get( context.project );
AdornedRulerPanel *ruler = panel->mRuler;
AdornedRulerPanel *ruler = panel->GetRuler();
int nTracks = TrackList::Get( context.project ).size();