diff --git a/src/ViewInfo.cpp b/src/ViewInfo.cpp index 041570665..33b2ad78e 100644 --- a/src/ViewInfo.cpp +++ b/src/ViewInfo.cpp @@ -13,21 +13,29 @@ Paul Licameli #include "Internat.h" #include "xml/XMLWriter.h" -ViewInfo::ViewInfo(double start, double screenDuration, double pixelsPerSecond) - : selectedRegion() - , track(0) - , vpos(0) +ZoomInfo::ZoomInfo(double start, double screenDuration, double pixelsPerSecond) + : vpos(0) , h(start) , screen(screenDuration) - , total(screen) , zoom(pixelsPerSecond) +{ +} +ZoomInfo::~ZoomInfo() +{ +} + + +ViewInfo::ViewInfo(double start, double screenDuration, double pixelsPerSecond) + : ZoomInfo(start, screenDuration, pixelsPerSecond) + , selectedRegion() + , track(NULL) + , total(screen) , sbarH(0) , sbarScreen(1) , sbarTotal(1) , sbarScale(1.0) , scrollStep(16) - , bUpdateTrackIndicator(true) { } diff --git a/src/ViewInfo.h b/src/ViewInfo.h index a39cd296c..013006b3d 100644 --- a/src/ViewInfo.h +++ b/src/ViewInfo.h @@ -18,10 +18,28 @@ const double gMaxZoom = 6000000, class Track; -class AUDACITY_DLL_API ViewInfo + +// The subset of ViewInfo information (other than selection) +// that is sufficient for purposes of TrackArtist, +// and for computing conversions between track times and pixel positions. +class AUDACITY_DLL_API ZoomInfo { public: + ZoomInfo(double start, double duration, double pixelsPerSecond); + ~ZoomInfo(); + int vpos; // vertical scroll pos + + double h; // h pos in secs + + double screen; // screen width in secs + double zoom; // pixels per second +}; + +class AUDACITY_DLL_API ViewInfo + : public ZoomInfo +{ +public: ViewInfo(double start, double screenDuration, double pixelsPerSecond); // Current selection @@ -31,13 +49,8 @@ public: // Scroll info Track *track; // first visible track - int vpos; // vertical scroll pos - double h; // h pos in secs - double screen; // screen width in secs double total; // total width in secs - double zoom; // pixels per second - // Current horizontal scroll bar positions, in pixels wxInt64 sbarH; wxInt64 sbarScreen;