1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-08 06:03:49 +01:00

Add and use some ZoomInfo and ViewInfo member functions, so we can eliminate...

... miscellaneous direct uses of ZoomInfo::zoom to test and set zoom level.

This includes all the remaining assignments to it.

But moving TrackInfo::PositionToTime and TrackInfo::TimeToPosition into
ZoomInfo and using them is needed to eliminate many more uses.

Also #if'd out the unused AudacityProject::OnZoomToggle().
This commit is contained in:
Paul-Licameli
2015-04-19 19:26:36 -04:00
committed by Paul Licameli
parent 8ba9ea5621
commit 5a6d5d1443
11 changed files with 174 additions and 73 deletions

View File

@@ -152,7 +152,8 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
sampleFormat GetDefaultFormat() { return mDefaultFormat; }
double GetRate() { return mRate; }
double GetZoom() { return mViewInfo.zoom; }
bool ZoomInAvailable() const { return mViewInfo.ZoomInAvailable(); }
bool ZoomOutAvailable() const { return mViewInfo.ZoomOutAvailable(); }
double GetSel0() { return mViewInfo.selectedRegion.t0(); }
double GetSel1() { return mViewInfo.selectedRegion.t1(); }
@@ -308,6 +309,7 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
void SelectNone();
void SelectAllIfNone();
void Zoom(double level);
void ZoomBy(double multiplier);
void Rewind(bool shift);
void SkipEnd(bool shift);
void EditByLabel( WaveTrack::EditFunction action, bool bSyncLockedTracks );