mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-14 15:48:21 +02:00
ViewInfo has a base class, ZoomInfo, containing only what TrackArtist needs besides the SelectedRegion
This commit is contained in:
parent
ab21f75c77
commit
8ba9ea5621
@ -13,21 +13,29 @@ Paul Licameli
|
|||||||
#include "Internat.h"
|
#include "Internat.h"
|
||||||
#include "xml/XMLWriter.h"
|
#include "xml/XMLWriter.h"
|
||||||
|
|
||||||
ViewInfo::ViewInfo(double start, double screenDuration, double pixelsPerSecond)
|
ZoomInfo::ZoomInfo(double start, double screenDuration, double pixelsPerSecond)
|
||||||
: selectedRegion()
|
: vpos(0)
|
||||||
, track(0)
|
|
||||||
, vpos(0)
|
|
||||||
, h(start)
|
, h(start)
|
||||||
, screen(screenDuration)
|
, screen(screenDuration)
|
||||||
, total(screen)
|
|
||||||
, zoom(pixelsPerSecond)
|
, zoom(pixelsPerSecond)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
ZoomInfo::~ZoomInfo()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ViewInfo::ViewInfo(double start, double screenDuration, double pixelsPerSecond)
|
||||||
|
: ZoomInfo(start, screenDuration, pixelsPerSecond)
|
||||||
|
, selectedRegion()
|
||||||
|
, track(NULL)
|
||||||
|
, total(screen)
|
||||||
, sbarH(0)
|
, sbarH(0)
|
||||||
, sbarScreen(1)
|
, sbarScreen(1)
|
||||||
, sbarTotal(1)
|
, sbarTotal(1)
|
||||||
, sbarScale(1.0)
|
, sbarScale(1.0)
|
||||||
, scrollStep(16)
|
, scrollStep(16)
|
||||||
|
|
||||||
, bUpdateTrackIndicator(true)
|
, bUpdateTrackIndicator(true)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -18,10 +18,28 @@ const double gMaxZoom = 6000000,
|
|||||||
|
|
||||||
class Track;
|
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:
|
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);
|
ViewInfo(double start, double screenDuration, double pixelsPerSecond);
|
||||||
|
|
||||||
// Current selection
|
// Current selection
|
||||||
@ -31,13 +49,8 @@ public:
|
|||||||
// Scroll info
|
// Scroll info
|
||||||
|
|
||||||
Track *track; // first visible track
|
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 total; // total width in secs
|
||||||
double zoom; // pixels per second
|
|
||||||
|
|
||||||
// Current horizontal scroll bar positions, in pixels
|
// Current horizontal scroll bar positions, in pixels
|
||||||
wxInt64 sbarH;
|
wxInt64 sbarH;
|
||||||
wxInt64 sbarScreen;
|
wxInt64 sbarScreen;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user