11#ifndef __AUDACITY_ZOOM_INFO__
12#define __AUDACITY_ZOOM_INFO__
46 ZoomInfo(
double start,
double pixelsPerSecond);
65 double PositionToTime(
int64 position,
67 ,
bool ignoreFisheye =
false
74 int64 TimeToPosition(
double time,
76 ,
bool ignoreFisheye =
false
81 double TimeRangeToPixelWidth(
double timeRange)
const;
85 return PositionToTime(offset + TimeToPosition(time, ignoreFisheye), ignoreFisheye);
97 {
return GetVRulerOffset() + GetVRulerWidth() + 1; }
102 std::max( 0, GetWidth() - ( GetLeftOffset() +
kRightMargin ) );
109 auto width = GetTracksUsableWidth();
110 return PositionToTime(width, 0,
true);
113 bool ZoomInAvailable()
const;
114 bool ZoomOutAvailable()
const;
117 {
return 44100.0 / 512.0; }
121 void SetZoom(
double pixelsPerSecond);
125 double GetZoom()
const;
130 double GetAbsoluteOffset(
double offset)
const;
132 static double GetMaxZoom( );
133 static double GetMinZoom( );
137 void ZoomBy(
double multiplier);
142 : position(p), averageZoom(z), inFisheye(i) {}
178 int mVRulerWidth{ 36 };
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
ZoomInfo(const ZoomInfo &)=delete
static double GetDefaultZoom()
bool InFisheye(int64, int64=0) const
std::vector< Interval > Intervals
double GetScreenEndTime() const
double zoom
pixels per second
int GetVRulerOffset() const
double OffsetTimeByPixels(double time, int64 offset, bool ignoreFisheye=false) const
int64 GetFisheyeRightBoundary(int64=0) const
void SetVRulerWidth(int width)
int GetLeftOffset() const
int GetTracksUsableWidth() const
int64 GetFisheyeLeftBoundary(int64=0) const
double hpos
Leftmost visible timeline position in seconds.
int GetVRulerWidth() const
FisheyeState GetFisheyeState() const
Interval(int64 p, double z, bool i)