![]() |
Audacity 3.2.0
|
#include <ZoomInfo.h>
Classes | |
struct | Interval |
Public Types | |
enum | FisheyeState { HIDDEN , PINNED , NUM_STATES } |
using | int64 = std::int64_t |
typedef std::vector< Interval > | Intervals |
Public Member Functions | |
ZoomInfo (double start, double pixelsPerSecond) | |
~ZoomInfo () | |
ZoomInfo (const ZoomInfo &) PROHIBITED | |
ZoomInfo & | operator= (const ZoomInfo &) PROHIBITED |
double | PositionToTime (int64 position, int64 origin=0, bool ignoreFisheye=false) const |
int64 | TimeToPosition (double time, int64 origin=0, bool ignoreFisheye=false) const |
STM: Converts a project time to screen x position. More... | |
double | TimeRangeToPixelWidth (double timeRange) const |
double | OffsetTimeByPixels (double time, int64 offset, bool ignoreFisheye=false) const |
int | GetWidth () const |
void | SetWidth (int width) |
int | GetVRulerWidth () const |
void | SetVRulerWidth (int width) |
int | GetVRulerOffset () const |
int | GetLeftOffset () const |
int | GetTracksUsableWidth () const |
double | GetScreenEndTime () const |
bool | ZoomInAvailable () const |
bool | ZoomOutAvailable () const |
void | SetZoom (double pixelsPerSecond) |
double | GetZoom () const |
void | ZoomBy (double multiplier) |
void | FindIntervals (double rate, Intervals &results, int64 width, int64 origin=0) const |
FisheyeState | GetFisheyeState () const |
bool | InFisheye (int64, int64=0) const |
int64 | GetFisheyeLeftBoundary (int64=0) const |
int64 | GetFisheyeRightBoundary (int64=0) const |
Static Public Member Functions | |
static double | GetDefaultZoom () |
static double | GetMaxZoom () |
static double | GetMinZoom () |
Public Attributes | |
int | vpos |
double | h |
int | mWidth { 0 } |
int | mVRulerWidth { 36 } |
Protected Attributes | |
double | zoom |
Definition at line 36 of file ZoomInfo.h.
using ZoomInfo::int64 = std::int64_t |
Definition at line 41 of file ZoomInfo.h.
typedef std::vector<Interval> ZoomInfo::Intervals |
Definition at line 136 of file ZoomInfo.h.
Enumerator | |
---|---|
HIDDEN | |
PINNED | |
NUM_STATES |
Definition at line 148 of file ZoomInfo.h.
ZoomInfo::ZoomInfo | ( | double | start, |
double | pixelsPerSecond | ||
) |
Definition at line 21 of file ZoomInfo.cpp.
ZoomInfo::~ZoomInfo | ( | ) |
Definition at line 28 of file ZoomInfo.cpp.
ZoomInfo::ZoomInfo | ( | const ZoomInfo & | ) |
void ZoomInfo::FindIntervals | ( | double | rate, |
Intervals & | results, | ||
int64 | width, | ||
int64 | origin = 0 |
||
) | const |
Definition at line 103 of file ZoomInfo.cpp.
References zoom.
Referenced by anonymous_namespace{WaveformView.cpp}::FindWavePortions(), and anonymous_namespace{SampleHandle.cpp}::SampleResolutionTest().
|
inlinestatic |
Definition at line 113 of file ZoomInfo.h.
Referenced by anonymous_namespace{ViewMenus.cpp}::GetZoomOfPreset(), ViewActions::Handler::OnZoomNormal(), ZoomHandle::Release(), and TrackPanel::UpdateViewIfNoTracks().
Definition at line 164 of file ZoomInfo.h.
Definition at line 167 of file ZoomInfo.h.
|
inline |
Definition at line 154 of file ZoomInfo.h.
|
inline |
Definition at line 93 of file ZoomInfo.h.
Referenced by LabelTrackView::DialogForLabelName(), TrackPanel::GetMostRecentXPos(), and TrackPanel::UpdateVRulerSize().
|
static |
Definition at line 77 of file ZoomInfo.cpp.
References anonymous_namespace{ZoomInfo.cpp}::gMaxZoom.
Referenced by anonymous_namespace{ViewMenus.cpp}::GetZoomOfPreset().
|
static |
|
inline |
Definition at line 104 of file ZoomInfo.h.
Referenced by TrackPanel::HandlePageDownKey(), and TrackPanel::HandlePageUpKey().
|
inline |
|
inline |
Definition at line 90 of file ZoomInfo.h.
References kLeftMargin, and kTrackInfoWidth.
Referenced by TrackPanel::UpdateTrackVRuler().
|
inline |
Definition at line 88 of file ZoomInfo.h.
Referenced by TrackPanel::UpdateTrackVRuler(), and TrackPanel::UpdateVRulerSize().
|
inline |
Definition at line 85 of file ZoomInfo.h.
double ZoomInfo::GetZoom | ( | ) | const |
Definition at line 159 of file ZoomInfo.h.
|
inline |
Definition at line 80 of file ZoomInfo.h.
double ZoomInfo::PositionToTime | ( | int64 | position, |
int64 | origin = 0 , |
||
bool | ignoreFisheye = false |
||
) | const |
Converts a position (mouse X coordinate) to project time, in seconds. Needs the left edge of the track as an additional parameter.
Definition at line 35 of file ZoomInfo.cpp.
Referenced by SelectHandle::AdjustSelection(), anonymous_namespace{WaveTrackView.cpp}::CalculateAdjustmentForZoomLevel(), anonymous_namespace{SelectHandle.cpp}::ChooseBoundary(), ClipParameters::ClipParameters(), CommonTrackPanelCell::DoContextMenu(), TimeShiftHandle::DoSlideVertical(), SampleHandle::FindSampleEditingLevel(), CommonTrackView::GetEnvelopeValues(), TrackPanel::GetMostRecentXPos(), LabelGlyphHandle::HandleGlyphDragRelease(), EnvelopeEditor::HandleMouseButtonDown(), anonymous_namespace{SampleHandle.cpp}::IsSampleEditingPossible(), EnvelopeEditor::MoveDragPoint(), AdornedRulerPanel::Pos2Time(), anonymous_namespace{BrushHandle.cpp}::PositionToLongSample(), SelectHandle::SelectHandle(), and LinearUpdater::Update().
|
inline |
Definition at line 89 of file ZoomInfo.h.
Referenced by TrackPanel::UpdateVRulerSize().
|
inline |
Definition at line 86 of file ZoomInfo.h.
Referenced by TrackPanel::OnSize().
void ZoomInfo::SetZoom | ( | double | pixelsPerSecond | ) |
Definition at line 80 of file ZoomInfo.cpp.
References GetActiveProject(), anonymous_namespace{ZoomInfo.cpp}::gMaxZoom, anonymous_namespace{ZoomInfo.cpp}::gMinZoom, min(), and zoom.
Referenced by TrackPanel::UpdateViewIfNoTracks(), and ZoomBy().
double ZoomInfo::TimeRangeToPixelWidth | ( | double | timeRange | ) | const |
auto ZoomInfo::TimeToPosition | ( | double | time, |
int64 | origin = 0 , |
||
bool | ignoreFisheye = false |
||
) | const |
STM: Converts a project time to screen x position.
Definition at line 45 of file ZoomInfo.cpp.
Referenced by anonymous_namespace{TimeShiftHandle.cpp}::AdjustToSnap(), anonymous_namespace{SelectHandle.cpp}::ChooseTimeBoundary(), ClipParameters::ClipParameters(), LabelTrackView::ComputeLayout(), LabelTrackView::DialogForLabelName(), ClipParameters::GetClipRect(), LabelGlyphHandle::HandleGlyphClick(), EnvelopeEditor::HandleMouseButtonDown(), anonymous_namespace{CutlineHandle.cpp}::IsOverCutline(), SnapManager::PixelDiff(), anonymous_namespace{SampleHandle.cpp}::SampleResolutionTest(), SnapManager::Snap(), AdornedRulerPanel::Time2Pos(), and LinearUpdater::Update().
void ZoomInfo::ZoomBy | ( | double | multiplier | ) |
Definition at line 98 of file ZoomInfo.cpp.
References SetZoom(), and zoom.
bool ZoomInfo::ZoomInAvailable | ( | ) | const |
Definition at line 66 of file ZoomInfo.cpp.
References anonymous_namespace{ZoomInfo.cpp}::gMaxZoom, and zoom.
Referenced by ZoomInAvailableFlag().
bool ZoomInfo::ZoomOutAvailable | ( | ) | const |
Definition at line 71 of file ZoomInfo.cpp.
References anonymous_namespace{ZoomInfo.cpp}::gMinZoom, and zoom.
Referenced by ZoomOutAvailableFlag().
double ZoomInfo::h |
Definition at line 52 of file ZoomInfo.h.
Referenced by anonymous_namespace{Scrubbing.cpp}::FindScrubbingSpeed(), anonymous_namespace{Scrubbing.cpp}::FindSeekSpeed(), TrackPanel::HandlePageUpKey(), PositionToTime(), ViewInfo::SetBeforeScreenWidth(), and TrackPanel::UpdateViewIfNoTracks().
int ZoomInfo::mVRulerWidth { 36 } |
Definition at line 171 of file ZoomInfo.h.
int ZoomInfo::mWidth { 0 } |
Definition at line 170 of file ZoomInfo.h.
int ZoomInfo::vpos |
Definition at line 50 of file ZoomInfo.h.
Referenced by TrackPanel::OnEnsureVisible(), TrackPanel::RefreshTrack(), and TrackPanel::VerticalScroll().
|
protected |
Definition at line 55 of file ZoomInfo.h.
Referenced by FindIntervals(), GetZoom(), PositionToTime(), ViewInfo::SetBeforeScreenWidth(), SetZoom(), TimeRangeToPixelWidth(), ZoomBy(), ZoomInAvailable(), and ZoomOutAvailable().