![]() |
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 &)=delete | |
| ZoomInfo & | operator= (const ZoomInfo &)=delete |
| 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 |
| double | GetAbsoluteOffset (double offset) const |
| void | ZoomBy (double multiplier) |
| Intervals | FindIntervals (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 | |
| double | hpos |
| Leftmost visible timeline position in seconds. More... | |
| int | mWidth { 0 } |
| int | mVRulerWidth { 36 } |
Protected Attributes | |
| double | zoom |
| pixels per second More... | |
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 144 of file ZoomInfo.h.
| Enumerator | |
|---|---|
| HIDDEN | |
| PINNED | |
| NUM_STATES | |
Definition at line 155 of file ZoomInfo.h.
| ZoomInfo::ZoomInfo | ( | double | start, |
| double | pixelsPerSecond | ||
| ) |
| start | leftmost visible timeline position, in seconds |
Definition at line 21 of file ZoomInfo.cpp.
| ZoomInfo::~ZoomInfo | ( | ) |
Definition at line 27 of file ZoomInfo.cpp.
|
delete |
| ZoomInfo::Intervals ZoomInfo::FindIntervals | ( | int64 | width, |
| int64 | origin = 0 |
||
| ) | const |
Definition at line 99 of file ZoomInfo.cpp.
References zoom.
Referenced by anonymous_namespace{WaveformView.cpp}::FindWavePortions().
| double ZoomInfo::GetAbsoluteOffset | ( | double | offset | ) | const |
Get the absolute pixel offset, that corresponds to an offset on time line. This function effectively return std::floor(0.5 + h * zoom + offset)
Definition at line 77 of file ZoomInfo.cpp.
Referenced by anonymous_namespace{TrackArt.cpp}::BeatsGridlinePainter::GetBoundaries().
|
inlinestatic |
Definition at line 116 of file ZoomInfo.h.
Referenced by anonymous_namespace{ViewMenus.cpp}::GetZoomOfPreset(), anonymous_namespace{ViewMenus.cpp}::OnZoomNormal(), ZoomHandle::Release(), TEST_CASE(), and TrackPanel::UpdateViewIfNoTracks().
Definition at line 171 of file ZoomInfo.h.
Definition at line 174 of file ZoomInfo.h.
|
inline |
Definition at line 161 of file ZoomInfo.h.
|
inline |
Definition at line 96 of file ZoomInfo.h.
Referenced by LabelTrackView::DialogForLabelName(), TrackPanel::GetMostRecentXPos(), and TrackPanel::UpdateVRulerSize().
|
static |
Definition at line 82 of file ZoomInfo.cpp.
References anonymous_namespace{ZoomInfo.cpp}::gMaxZoom.
Referenced by anonymous_namespace{ViewMenus.cpp}::GetZoomOfPreset().
|
static |
|
inline |
Definition at line 107 of file ZoomInfo.h.
Referenced by TrackPanel::HandlePageDownKey(), and TrackPanel::HandlePageUpKey().
|
inline |
|
inline |
Definition at line 93 of file ZoomInfo.h.
References kLeftMargin, and kTrackInfoWidth.
Referenced by TrackPanel::UpdateTrackVRuler().
|
inline |
Definition at line 91 of file ZoomInfo.h.
Referenced by TrackPanel::UpdateTrackVRuler(), and TrackPanel::UpdateVRulerSize().
|
inline |
Definition at line 88 of file ZoomInfo.h.
| double ZoomInfo::GetZoom | ( | ) | const |
Definition at line 75 of file ZoomInfo.cpp.
References zoom.
Referenced by GraphicsDataCacheBase::PerformBaseLookup().
Definition at line 166 of file ZoomInfo.h.
|
inline |
Definition at line 83 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 34 of file ZoomInfo.cpp.
Referenced by SelectHandle::AdjustSelection(), anonymous_namespace{SelectHandle.cpp}::ChooseBoundary(), ClipParameters::ClipParameters(), CommonTrackPanelCell::DoContextMenu(), TimeShiftHandle::DoSlideVertical(), SampleHandle::FindSampleEditingLevel(), CommonChannelView::GetEnvelopeValues(), TrackPanel::GetMostRecentXPos(), anonymous_namespace{ClipParameters.cpp}::GetPixelsPerSecond(), LabelGlyphHandle::HandleGlyphDragRelease(), EnvelopeEditor::HandleMouseButtonDown(), EnvelopeEditor::MoveDragPoint(), AdornedRulerPanel::Pos2Time(), anonymous_namespace{BrushHandle.cpp}::PositionToLongSample(), SelectHandle::SelectHandle(), and LinearUpdater::Update().
|
inline |
Definition at line 92 of file ZoomInfo.h.
Referenced by TrackPanel::UpdateVRulerSize().
|
inline |
Definition at line 89 of file ZoomInfo.h.
Referenced by TrackPanel::OnSize().
| void ZoomInfo::SetZoom | ( | double | pixelsPerSecond | ) |
Definition at line 88 of file ZoomInfo.cpp.
References 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 |
Definition at line 60 of file ZoomInfo.cpp.
References zoom.
Referenced by anonymous_namespace{TrackArt.cpp}::BeatsGridlinePainter::GetMinorTick().
| auto ZoomInfo::TimeToPosition | ( | double | time, |
| int64 | origin = 0, |
||
| bool | ignoreFisheye = false |
||
| ) | const |
STM: Converts a project time to screen x position.
Definition at line 44 of file ZoomInfo.cpp.
Referenced by anonymous_namespace{TimeShiftHandle.cpp}::AdjustToSnap(), anonymous_namespace{GraphicsDataCacheTests.cpp}::CheckCacheElementLookup(), anonymous_namespace{SelectHandle.cpp}::ChooseTimeBoundary(), ClipParameters::ClipParameters(), LabelTrackView::ComputeLayout(), LabelTrackView::DialogForLabelName(), TrackArt::DrawBackgroundWithSelection(), TrackArt::DrawCursor(), ClipParameters::GetClipRect(), anonymous_namespace{TrackArt.cpp}::BeatsGridlinePainter::GetPositionInRect(), LabelGlyphHandle::HandleGlyphClick(), EnvelopeEditor::HandleMouseButtonDown(), anonymous_namespace{CutlineHandle.cpp}::IsOverCutline(), GraphicsDataCacheBase::PerformBaseLookup(), SnapManager::PixelDiff(), anonymous_namespace{SampleHandle.cpp}::SampleResolutionTest(), WaveBitmapCache::SetSelection(), SnapManager::Snap(), TEST_CASE(), AdornedRulerPanel::Time2Pos(), and LinearUpdater::Update().
| void ZoomInfo::ZoomBy | ( | double | multiplier | ) |
Definition at line 93 of file ZoomInfo.cpp.
References SetZoom(), and zoom.
| bool ZoomInfo::ZoomInAvailable | ( | ) | const |
Definition at line 65 of file ZoomInfo.cpp.
References anonymous_namespace{ZoomInfo.cpp}::gMaxZoom, and zoom.
Referenced by ZoomInAvailableFlag().
| bool ZoomInfo::ZoomOutAvailable | ( | ) | const |
Definition at line 70 of file ZoomInfo.cpp.
References anonymous_namespace{ZoomInfo.cpp}::gMinZoom, and zoom.
Referenced by ZoomOutAvailableFlag().
| double ZoomInfo::hpos |
Leftmost visible timeline position in seconds.
Definition at line 54 of file ZoomInfo.h.
Referenced by anonymous_namespace{Scrubbing.cpp}::FindScrubbingSpeed(), anonymous_namespace{Scrubbing.cpp}::FindSeekSpeed(), GetAbsoluteOffset(), TrackPanel::HandlePageUpKey(), PositionToTime(), and TrackPanel::UpdateViewIfNoTracks().
| int ZoomInfo::mVRulerWidth { 36 } |
Definition at line 178 of file ZoomInfo.h.
| int ZoomInfo::mWidth { 0 } |
Definition at line 177 of file ZoomInfo.h.
|
protected |
pixels per second
Definition at line 58 of file ZoomInfo.h.
Referenced by FindIntervals(), GetAbsoluteOffset(), GetZoom(), PositionToTime(), SetZoom(), TimeRangeToPixelWidth(), ZoomBy(), ZoomInAvailable(), and ZoomOutAvailable().