1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-21 22:12:58 +02:00

GetVRulerWidth, GetLabelWidth, GetLeftOffset out of TrackPanel.h...

... And some things demoted from ViewInfo to ZoomInfo, related to x coordinates
only
This commit is contained in:
Paul Licameli
2019-06-21 11:26:13 -04:00
parent baf31dd72e
commit f87dfd43c1
11 changed files with 62 additions and 60 deletions

View File

@@ -22,6 +22,20 @@
class AudacityProject;
// See big pictorial comment in TrackPanel.cpp for explanation of these numbers
enum : int {
// Constants related to x coordinates in the track panel
kBorderThickness = 1,
kShadowThickness = 1,
kLeftInset = 4,
kRightInset = kLeftInset,
kLeftMargin = kLeftInset + kBorderThickness,
kRightMargin = kRightInset + kShadowThickness + kBorderThickness,
kTrackInfoWidth = 100 - kLeftMargin,
};
// 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.
@@ -83,6 +97,9 @@ public:
int GetVRulerWidth() const { return mVRulerWidth; }
void SetVRulerWidth( int width ) { mVRulerWidth = width; }
int GetVRulerOffset() const { return kTrackInfoWidth + kLeftMargin; }
int GetLabelWidth() const { return GetVRulerOffset() + GetVRulerWidth(); }
int GetLeftOffset() const { return GetLabelWidth() + 1;}
bool ZoomInAvailable() const;
bool ZoomOutAvailable() const;