![]() |
Audacity 3.2.0
|
#include <ZoomInfo.h>
Classes | |
struct | Interval |
Public Types | |
enum | FisheyeState { HIDDEN , PINNED , NUM_STATES } |
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 (wxInt64 position, wxInt64 origin=0, bool ignoreFisheye=false) const |
wxInt64 | TimeToPosition (double time, wxInt64 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, wxInt64 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, wxInt64 width, wxInt64 origin=0) const |
FisheyeState | GetFisheyeState () const |
bool | InFisheye (wxInt64, wxInt64 WXUNUSED(origin=0)) const |
wxInt64 | GetFisheyeLeftBoundary (wxInt64 WXUNUSED(origin=0)) const |
wxInt64 | GetFisheyeRightBoundary (wxInt64 WXUNUSED(origin=0)) const |
![]() | |
virtual | ~Base () |
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 41 of file ZoomInfo.h.
typedef std::vector<Interval> ZoomInfo::Intervals |
Definition at line 140 of file ZoomInfo.h.
Enumerator | |
---|---|
HIDDEN | |
PINNED | |
NUM_STATES |
Definition at line 152 of file ZoomInfo.h.
ZoomInfo::ZoomInfo | ( | double | start, |
double | pixelsPerSecond | ||
) |
Definition at line 20 of file ZoomInfo.cpp.
ZoomInfo::~ZoomInfo | ( | ) |
Definition at line 27 of file ZoomInfo.cpp.
ZoomInfo::ZoomInfo | ( | const ZoomInfo & | ) |
void ZoomInfo::FindIntervals | ( | double | rate, |
Intervals & | results, | ||
wxInt64 | width, | ||
wxInt64 | origin = 0 |
||
) | const |
Definition at line 102 of file ZoomInfo.cpp.
References zoom.
Referenced by anonymous_namespace{WaveformView.cpp}::FindWavePortions(), and anonymous_namespace{SampleHandle.cpp}::SampleResolutionTest().
|
inlinestatic |
Definition at line 117 of file ZoomInfo.h.
Referenced by anonymous_namespace{ViewMenus.cpp}::GetZoomOfPreset(), ViewActions::Handler::OnZoomNormal(), ZoomHandle::Release(), and TrackPanel::UpdateViewIfNoTracks().
|
inline |
Definition at line 168 of file ZoomInfo.h.
|
inline |
Definition at line 171 of file ZoomInfo.h.
|
inline |
Definition at line 158 of file ZoomInfo.h.
|
inline |
Definition at line 97 of file ZoomInfo.h.
Referenced by LabelTrackView::DialogForLabelName(), TrackPanel::GetMostRecentXPos(), and TrackPanel::UpdateVRulerSize().
|
static |
Definition at line 76 of file ZoomInfo.cpp.
References anonymous_namespace{ZoomInfo.cpp}::gMaxZoom.
Referenced by anonymous_namespace{ViewMenus.cpp}::GetZoomOfPreset().
|
static |
|
inline |
Definition at line 108 of file ZoomInfo.h.
Referenced by TrackPanel::HandlePageDownKey(), and TrackPanel::HandlePageUpKey().
|
inline |
|
inline |
Definition at line 94 of file ZoomInfo.h.
References kLeftMargin, and kTrackInfoWidth.
Referenced by TrackPanel::UpdateTrackVRuler().
|
inline |
Definition at line 92 of file ZoomInfo.h.
Referenced by TrackPanel::UpdateTrackVRuler(), and TrackPanel::UpdateVRulerSize().
|
inline |
Definition at line 89 of file ZoomInfo.h.
double ZoomInfo::GetZoom | ( | ) | const |
|
inline |
Definition at line 163 of file ZoomInfo.h.
|
inline |
Definition at line 84 of file ZoomInfo.h.
double ZoomInfo::PositionToTime | ( | wxInt64 | position, |
wxInt64 | 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{WaveTrackView.cpp}::CalculateAdjustmentForZoomLevel(), anonymous_namespace{SelectHandle.cpp}::ChooseBoundary(), ClipParameters::ClipParameters(), CommonTrackPanelCell::DoContextMenu(), TimeShiftHandle::DoSlideVertical(), anonymous_namespace{TimeShiftHandle.cpp}::FindDesiredSlideAmount(), SampleHandle::FindSampleEditingLevel(), CommonTrackView::GetEnvelopeValues(), TrackPanel::GetMostRecentXPos(), LabelGlyphHandle::HandleGlyphDragRelease(), EnvelopeEditor::HandleMouseButtonDown(), anonymous_namespace{SampleHandle.cpp}::IsSampleEditingPossible(), EnvelopeEditor::MoveDragPoint(), AdornedRulerPanel::Pos2Time(), anonymous_namespace{BrushHandle.cpp}::PositionToLongSample(), and SelectHandle::SelectHandle().
|
inline |
Definition at line 93 of file ZoomInfo.h.
Referenced by TrackPanel::UpdateVRulerSize().
|
inline |
Definition at line 90 of file ZoomInfo.h.
Referenced by TrackPanel::OnSize().
void ZoomInfo::SetZoom | ( | double | pixelsPerSecond | ) |
Definition at line 79 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 |
wxInt64 ZoomInfo::TimeToPosition | ( | double | time, |
wxInt64 | 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{SelectHandle.cpp}::ChooseTimeBoundary(), ClipParameters::ClipParameters(), LabelTrackView::ComputeLayout(), LabelTrackView::DialogForLabelName(), anonymous_namespace{TimeShiftHandle.cpp}::FindDesiredSlideAmount(), ClipParameters::GetClipRect(), LabelGlyphHandle::HandleGlyphClick(), EnvelopeEditor::HandleMouseButtonDown(), anonymous_namespace{CutlineHandle.cpp}::IsOverCutline(), SnapManager::PixelDiff(), anonymous_namespace{SampleHandle.cpp}::SampleResolutionTest(), SnapManager::Snap(), and AdornedRulerPanel::Time2Pos().
void ZoomInfo::ZoomBy | ( | double | multiplier | ) |
Definition at line 97 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::h |
Definition at line 56 of file ZoomInfo.h.
Referenced by anonymous_namespace{Scrubbing.cpp}::FindScrubbingSpeed(), anonymous_namespace{Scrubbing.cpp}::FindSeekSpeed(), TrackPanel::HandlePageUpKey(), PositionToTime(), ViewInfo::SetBeforeScreenWidth(), TimeToPosition(), and TrackPanel::UpdateViewIfNoTracks().
int ZoomInfo::mVRulerWidth { 36 } |
Definition at line 175 of file ZoomInfo.h.
int ZoomInfo::mWidth { 0 } |
Definition at line 174 of file ZoomInfo.h.
int ZoomInfo::vpos |
Definition at line 54 of file ZoomInfo.h.
Referenced by TrackPanel::OnEnsureVisible(), TrackPanel::RefreshTrack(), and TrackPanel::VerticalScroll().
|
protected |
Definition at line 59 of file ZoomInfo.h.
Referenced by FindIntervals(), GetZoom(), PositionToTime(), ViewInfo::SetBeforeScreenWidth(), SetZoom(), TimeRangeToPixelWidth(), TimeToPosition(), ZoomBy(), ZoomInAvailable(), and ZoomOutAvailable().