Audacity  2.2.2
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
WaveTrackVZoomHandle Class Reference

#include <WaveTrackVZoomHandle.h>

Inheritance diagram for WaveTrackVZoomHandle:
UIHandle

Public Member Functions

 WaveTrackVZoomHandle (const std::shared_ptr< WaveTrack > &pTrack, const wxRect &rect, int y)
 
WaveTrackVZoomHandleoperator= (const WaveTrackVZoomHandle &)=default
 
virtual ~WaveTrackVZoomHandle ()
 
std::shared_ptr< WaveTrackGetTrack () const
 
void Enter (bool forward) override
 
Result Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
Result Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
HitTestPreview Preview (const TrackPanelMouseState &state, const AudacityProject *pProject) override
 
Result Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override
 
Result Cancel (AudacityProject *pProject) override
 
void DrawExtras (DrawingPass pass, wxDC *dc, const wxRegion &updateRegion, const wxRect &panelRect) override
 
- Public Member Functions inherited from UIHandle
virtual ~UIHandle ()=0
 
virtual bool HasRotation () const
 
virtual bool Rotate (bool forward)
 
virtual bool HasEscape () const
 
virtual bool Escape ()
 
virtual bool StopsOnKeystroke ()
 
virtual void OnProjectChange (AudacityProject *pProject)
 
Result GetChangeHighlight () const
 
void SetChangeHighlight (Result val)
 

Static Public Member Functions

static void DoZoom (AudacityProject *pProject, WaveTrack *pTrack, WaveTrack *partner, int ZoomKind, const wxRect &rect, int zoomStart, int zoomEnd, bool fixedMousePoint)
 
- Static Public Member Functions inherited from UIHandle
static UIHandle::Result NeedChangeHighlight (const UIHandle &, const UIHandle &)
 

Private Member Functions

 WaveTrackVZoomHandle (const WaveTrackVZoomHandle &)
 

Static Private Member Functions

static HitTestPreview HitPreview (const wxMouseState &state)
 

Private Attributes

std::weak_ptr< WaveTrackmpTrack
 
int mZoomStart {}
 
int mZoomEnd {}
 
wxRect mRect {}
 

Additional Inherited Members

- Public Types inherited from UIHandle
enum  DrawingPass { Cells, Panel }
 
using Result = unsigned
 
using Cell = TrackPanelCell
 
- Protected Attributes inherited from UIHandle
Result mChangeHighlight { 0 }
 

Detailed Description

Definition at line 32 of file WaveTrackVZoomHandle.h.

Constructor & Destructor Documentation

WaveTrackVZoomHandle::WaveTrackVZoomHandle ( const WaveTrackVZoomHandle )
private
WaveTrackVZoomHandle::WaveTrackVZoomHandle ( const std::shared_ptr< WaveTrack > &  pTrack,
const wxRect &  rect,
int  y 
)
explicit

Definition at line 51 of file WaveTrackVZoomHandle.cpp.

52  : mpTrack{ pTrack } , mZoomStart(y), mZoomEnd(y), mRect(rect)
53 {
54 }
std::weak_ptr< WaveTrack > mpTrack
WaveTrackVZoomHandle::~WaveTrackVZoomHandle ( )
virtual

Definition at line 586 of file WaveTrackVZoomHandle.cpp.

587 {
588 }

Member Function Documentation

UIHandle::Result WaveTrackVZoomHandle::Cancel ( AudacityProject pProject)
overridevirtual

Implements UIHandle.

Definition at line 691 of file WaveTrackVZoomHandle.cpp.

References RefreshCode::RefreshAll.

692 {
693  // Cancel is implemented! And there is no initial state to restore,
694  // so just return a code.
696 }
UIHandle::Result WaveTrackVZoomHandle::Click ( const TrackPanelMouseEvent event,
AudacityProject pProject 
)
overridevirtual

Implements UIHandle.

Definition at line 591 of file WaveTrackVZoomHandle.cpp.

References RefreshCode::RefreshNone.

592 {
594 }
void WaveTrackVZoomHandle::DoZoom ( AudacityProject pProject,
WaveTrack pTrack,
WaveTrack partner,
int  ZoomKind,
const wxRect &  rect,
int  zoomStart,
int  zoomEnd,
bool  fixedMousePoint 
)
static

Definition at line 67 of file WaveTrackVZoomHandle.cpp.

References WaveformSettings::dBRange, WaveTrack::GetDisplay(), WaveTrack::GetDisplayBounds(), SpectrogramSettings::GetFFTLength(), WaveTrack::GetRate(), SpectrogramSettings::GetScale(), WaveTrack::GetSpectrogramSettings(), WaveTrack::GetSpectrumBounds(), WaveTrack::GetWaveformSettings(), gPrefs, WaveformSettings::isLinear(), kZoom1to1, kZoomDiv2, kZoomHalfWave, kZoomIn, kZoomInByDrag, kZoomOut, kZoomReset, kZoomTimes2, LINEAR_TO_DB, min(), AudacityProject::ModifyState(), NumberScale::PositionToValue(), SpectrogramSettings::scaleType, WaveTrack::SetDisplayBounds(), WaveTrack::SetSpectrumBounds(), WaveTrack::Spectrum, and SpectrogramSettings::stLinear.

Referenced by WaveTrackVRulerControls::DoZoomPreset(), WaveTrackVRulerControls::HandleWheelRotation(), and WaveTrackVRulerMenuTable::OnZoom().

71 {
72  static const float ZOOMLIMIT = 0.001f;
73  int height = rect.height;
74  int ypos = rect.y;
75 
76  // Ensure start and end are in order (swap if not).
77  if (zoomEnd < zoomStart)
78  std::swap( zoomStart, zoomEnd );
79 
80  float min, max, c, minBand = 0;
81  const double rate = pTrack->GetRate();
82  const float halfrate = rate / 2;
83  float maxFreq = 8000.0;
84  const SpectrogramSettings &settings = pTrack->GetSpectrogramSettings();
85  NumberScale scale;
86  const bool spectral = (pTrack->GetDisplay() == WaveTrack::Spectrum);
87  const bool spectrumLinear = spectral &&
89 
90 
91  bool bDragZoom = IsDragZooming(zoomStart, zoomEnd);
92  // Add 100 if spectral to separate the kinds of zoom.
93  const int kSpectral = 100;
94 
95  // Possibly override the zoom kind.
96  if( bDragZoom )
97  ZoomKind = kZoomInByDrag;
98 
99  // If we are actually zooming a spectrum rather than a wave.
100  ZoomKind += spectral ? kSpectral:0;
101 
102  float top=2.0;
103  float half=0.5;
104 
105  if (spectral) {
106  pTrack->GetSpectrumBounds(&min, &max);
107  scale = (settings.GetScale(min, max));
108  const auto fftLength = settings.GetFFTLength();
109  const float binSize = rate / fftLength;
110  maxFreq = gPrefs->Read(wxT("/Spectrum/MaxFreq"), 8000L);
111  // JKC: Following discussions of Bug 1208 I'm allowing zooming in
112  // down to one bin.
113  // const int minBins =
114  // std::min(10, fftLength / 2); //minimum 10 freq bins, unless there are less
115  const int minBins = 1;
116  minBand = minBins * binSize;
117  }
118  else{
119  pTrack->GetDisplayBounds(&min, &max);
120  const WaveformSettings &settings = pTrack->GetWaveformSettings();
121  const bool linear = settings.isLinear();
122  if( !linear ){
123  top = (LINEAR_TO_DB(2.0) + settings.dBRange) / settings.dBRange;
124  half = (LINEAR_TO_DB(0.5) + settings.dBRange) / settings.dBRange;
125  }
126  }
127 
128 
129  // Compute min and max.
130  switch(ZoomKind)
131  {
132  default:
133  // If we have covered all the cases, this won't happen.
134  // In release builds Audacity will ignore the zoom.
135  wxFAIL_MSG("Zooming Case not implemented by Audacity");
136  break;
137  case kZoomReset:
138  case kZoom1to1:
139  {
140  // Zoom out full
141  min = -1.0;
142  max = 1.0;
143  }
144  break;
145  case kZoomDiv2:
146  {
147  // Zoom out even more than full :-)
148  // -2.0..+2.0 (or logarithmic equivalent)
149  min = -top;
150  max = top;
151  }
152  break;
153  case kZoomTimes2:
154  {
155  // Zoom in to -0.5..+0.5
156  min = -half;
157  max = half;
158  }
159  break;
160  case kZoomHalfWave:
161  {
162  // Zoom to show fractionally more than the top half of the wave.
163  min = -0.01f;
164  max = 1.0;
165  }
166  break;
167  case kZoomInByDrag:
168  {
169  const float tmin = min, tmax = max;
170  const float p1 = (zoomStart - ypos) / (float)height;
171  const float p2 = (zoomEnd - ypos) / (float)height;
172  max = (tmax * (1.0 - p1) + tmin * p1);
173  min = (tmax * (1.0 - p2) + tmin * p2);
174 
175  // Waveform view - allow zooming down to a range of ZOOMLIMIT
176  if (max - min < ZOOMLIMIT) { // if user attempts to go smaller...
177  c = (min + max) / 2; // ...set centre of view to centre of dragged area and top/bottom to ZOOMLIMIT/2 above/below
178  min = c - ZOOMLIMIT / 2.0;
179  max = c + ZOOMLIMIT / 2.0;
180  }
181  }
182  break;
183  case kZoomIn:
184  {
185  // Enforce maximum vertical zoom
186  const float oldRange = max - min;
187  const float l = std::max(ZOOMLIMIT, 0.5f * oldRange);
188  const float ratio = l / (max - min);
189 
190  const float p1 = (zoomStart - ypos) / (float)height;
191  float c = (max * (1.0 - p1) + min * p1);
192  if (fixedMousePoint)
193  min = c - ratio * (1.0f - p1) * oldRange,
194  max = c + ratio * p1 * oldRange;
195  else
196  min = c - 0.5 * l,
197  max = c + 0.5 * l;
198  }
199  break;
200  case kZoomOut:
201  {
202  // Zoom out
203  if (min <= -1.0 && max >= 1.0) {
204  min = -top;
205  max = top;
206  }
207  else {
208  // limit to +/- 1 range unless already outside that range...
209  float minRange = (min < -1) ? -top : -1.0;
210  float maxRange = (max > 1) ? top : 1.0;
211  // and enforce vertical zoom limits.
212  const float p1 = (zoomStart - ypos) / (float)height;
213  if (fixedMousePoint) {
214  const float oldRange = max - min;
215  const float c = (max * (1.0 - p1) + min * p1);
216  min = std::min(maxRange - ZOOMLIMIT,
217  std::max(minRange, c - 2 * (1.0f - p1) * oldRange));
218  max = std::max(minRange + ZOOMLIMIT,
219  std::min(maxRange, c + 2 * p1 * oldRange));
220  }
221  else {
222  const float c = p1 * min + (1 - p1) * max;
223  const float l = (max - min);
224  min = std::min(maxRange - ZOOMLIMIT,
225  std::max(minRange, c - l));
226  max = std::max(minRange + ZOOMLIMIT,
227  std::min(maxRange, c + l));
228  }
229  }
230  }
231  break;
232 
233  // VZooming on spectral we don't implement the other zoom presets.
234  // They are also not in the menu.
235  case kZoomReset + kSpectral:
236  {
237  // Zoom out to normal level.
238  min = spectrumLinear ? 0.0f : 1.0f;
239  max = maxFreq;
240  }
241  break;
242  case kZoom1to1 + kSpectral:
243  case kZoomDiv2 + kSpectral:
244  case kZoomTimes2 + kSpectral:
245  case kZoomHalfWave + kSpectral:
246  {
247  // Zoom out full
248  min = spectrumLinear ? 0.0f : 1.0f;
249  max = halfrate;
250  }
251  break;
252  case kZoomInByDrag + kSpectral:
253  {
254  double xmin = 1 - (zoomEnd - ypos) / (float)height;
255  double xmax = 1 - (zoomStart - ypos) / (float)height;
256  const float middle = (xmin + xmax) / 2;
257  const float middleValue = scale.PositionToValue(middle);
258 
259  min = std::max(spectrumLinear ? 0.0f : 1.0f,
260  std::min(middleValue - minBand / 2,
261  scale.PositionToValue(xmin)
262  ));
263  max = std::min(halfrate,
264  std::max(middleValue + minBand / 2,
265  scale.PositionToValue(xmax)
266  ));
267  }
268  break;
269  case kZoomIn + kSpectral:
270  {
271  // Center the zoom-in at the click
272  const float p1 = (zoomStart - ypos) / (float)height;
273  const float middle = 1.0f - p1;
274  const float middleValue = scale.PositionToValue(middle);
275 
276  if (fixedMousePoint) {
277  min = std::max(spectrumLinear ? 0.0f : 1.0f,
278  std::min(middleValue - minBand * middle,
279  scale.PositionToValue(0.5f * middle)
280  ));
281  max = std::min(halfrate,
282  std::max(middleValue + minBand * p1,
283  scale.PositionToValue(middle + 0.5f * p1)
284  ));
285  }
286  else {
287  min = std::max(spectrumLinear ? 0.0f : 1.0f,
288  std::min(middleValue - minBand / 2,
289  scale.PositionToValue(middle - 0.25f)
290  ));
291  max = std::min(halfrate,
292  std::max(middleValue + minBand / 2,
293  scale.PositionToValue(middle + 0.25f)
294  ));
295  }
296  }
297  break;
298  case kZoomOut + kSpectral:
299  {
300  // Zoom out
301  const float p1 = (zoomStart - ypos) / (float)height;
302  // (Used to zoom out centered at midline, ignoring the click, if linear view.
303  // I think it is better to be consistent. PRL)
304  // Center zoom-out at the midline
305  const float middle = // spectrumLinear ? 0.5f :
306  1.0f - p1;
307 
308  if (fixedMousePoint) {
309  min = std::max(spectrumLinear ? 0.0f : 1.0f, scale.PositionToValue(-middle));
310  max = std::min(halfrate, scale.PositionToValue(1.0f + p1));
311  }
312  else {
313  min = std::max(spectrumLinear ? 0.0f : 1.0f, scale.PositionToValue(middle - 1.0f));
314  max = std::min(halfrate, scale.PositionToValue(middle + 1.0f));
315  }
316  }
317  break;
318  }
319 
320  // Now actually apply the zoom.
321  if (spectral) {
322  pTrack->SetSpectrumBounds(min, max);
323  if (partner)
324  partner->SetSpectrumBounds(min, max);
325  }
326  else {
327  pTrack->SetDisplayBounds(min, max);
328  if (partner)
329  partner->SetDisplayBounds(min, max);
330  }
331 
332  zoomEnd = zoomStart = 0;
333  if( pProject )
334  pProject->ModifyState(true);
335 }
AudacityPrefs * gPrefs
Definition: Prefs.cpp:73
bool isLinear() const
const int kZoomHalfWave
Spectrogram settings, either for one track or as defaults.
const WaveformSettings & GetWaveformSettings() const
Definition: WaveTrack.cpp:738
float PositionToValue(float pp) const
Definition: NumberScale.h:154
void GetSpectrumBounds(float *min, float *max) const
Definition: WaveTrack.cpp:337
void SetDisplayBounds(float min, float max) const
Definition: WaveTrack.cpp:331
size_t GetFFTLength() const
const SpectrogramSettings & GetSpectrogramSettings() const
Definition: WaveTrack.cpp:690
NumberScale GetScale(float minFreq, float maxFreq) const
void GetDisplayBounds(float *min, float *max) const
Definition: WaveTrack.cpp:325
const int kZoomOut
const int kZoomTimes2
int min(int a, int b)
void ModifyState(bool bWantsAutoSave)
Definition: Project.cpp:4747
const int kZoom1to1
const int kZoomInByDrag
#define LINEAR_TO_DB(x)
Definition: Audacity.h:217
void SetSpectrumBounds(float min, float max) const
Definition: WaveTrack.cpp:381
const int kZoomReset
double GetRate() const
Definition: WaveTrack.cpp:398
WaveTrackDisplay GetDisplay() const
Definition: WaveTrack.h:593
const int kZoomDiv2
const int kZoomIn
Waveform settings, either for one track or as defaults.
UIHandle::Result WaveTrackVZoomHandle::Drag ( const TrackPanelMouseEvent event,
AudacityProject pProject 
)
overridevirtual

Implements UIHandle.

Definition at line 597 of file WaveTrackVZoomHandle.cpp.

References Cancelled, TrackPanelMouseEvent::event, AudacityProject::GetTracks(), TrackList::Lock(), RefreshCode::RefreshAll, and RefreshCode::RefreshNone.

598 {
599  using namespace RefreshCode;
600  auto pTrack = pProject->GetTracks()->Lock(mpTrack);
601  if (!pTrack)
602  return Cancelled;
603 
604  const wxMouseEvent &event = evt.event;
605  if ( event.RightIsDown() )
606  return RefreshNone;
607  mZoomEnd = event.m_y;
608  if (IsDragZooming(mZoomStart, mZoomEnd))
609  return RefreshAll;
610  return RefreshNone;
611 }
std::weak_ptr< WaveTrack > mpTrack
std::shared_ptr< Subclass > Lock(const std::weak_ptr< Subclass > &wTrack)
Definition: Track.h:734
TrackList * GetTracks()
Definition: Project.h:192
void WaveTrackVZoomHandle::DrawExtras ( DrawingPass  pass,
wxDC *  dc,
const wxRegion &  updateRegion,
const wxRect &  panelRect 
)
overridevirtual

Reimplemented from UIHandle.

Definition at line 699 of file WaveTrackVZoomHandle.cpp.

References UIHandle::Cells, and TrackVRulerControls::DrawZooming().

700 {
701  if (!mpTrack.lock()) // TrackList::Lock()?
702  return;
703 
704  if ( pass == UIHandle::Cells &&
705  IsDragZooming( mZoomStart, mZoomEnd ) )
707  ( dc, mRect, panelRect, mZoomStart, mZoomEnd );
708 }
std::weak_ptr< WaveTrack > mpTrack
static void DrawZooming(wxDC *dc, const wxRect &cellRect, const wxRect &panelRect, int zoomStart, int zoomEnd)
void WaveTrackVZoomHandle::Enter ( bool  forward)
overridevirtual

Reimplemented from UIHandle.

Definition at line 56 of file WaveTrackVZoomHandle.cpp.

References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.

57 {
58 #ifdef EXPERIMENTAL_TRACK_PANEL_HIGHLIGHTING
60 #endif
61 }
Result mChangeHighlight
Definition: UIHandle.h:150
std::shared_ptr<WaveTrack> WaveTrackVZoomHandle::GetTrack ( ) const
inline

Definition at line 51 of file WaveTrackVZoomHandle.h.

References mpTrack.

51 { return mpTrack.lock(); }
std::weak_ptr< WaveTrack > mpTrack
HitTestPreview WaveTrackVZoomHandle::HitPreview ( const wxMouseState &  state)
staticprivate

Definition at line 565 of file WaveTrackVZoomHandle.cpp.

References _(), gPrefs, and MakeCursor().

566 {
567  static auto zoomInCursor =
568  ::MakeCursor(wxCURSOR_MAGNIFIER, ZoomInCursorXpm, 19, 15);
569  static auto zoomOutCursor =
570  ::MakeCursor(wxCURSOR_MAGNIFIER, ZoomOutCursorXpm, 19, 15);
571  static wxCursor arrowCursor{ wxCURSOR_ARROW };
572  bool bVZoom;
573  gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, false);
574  bVZoom &= !state.RightIsDown();
575  const auto message = bVZoom ?
576  _("Click to vertically zoom in. Shift-click to zoom out. Drag to specify a zoom region.") :
577  _("Right-click for menu.");
578 
579  return {
580  message,
581  bVZoom ? (state.ShiftDown() ? &*zoomOutCursor : &*zoomInCursor) : &arrowCursor
582  // , message
583  };
584 }
AudacityPrefs * gPrefs
Definition: Prefs.cpp:73
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
std::unique_ptr< wxCursor > MakeCursor(int WXUNUSED(CursorId), const char *const pXpm[36], int HotX, int HotY)
Definition: TrackPanel.cpp:274
WaveTrackVZoomHandle& WaveTrackVZoomHandle::operator= ( const WaveTrackVZoomHandle )
default
HitTestPreview WaveTrackVZoomHandle::Preview ( const TrackPanelMouseState state,
const AudacityProject pProject 
)
overridevirtual

Implements UIHandle.

Definition at line 614 of file WaveTrackVZoomHandle.cpp.

References TrackPanelMouseState::state.

615 {
616  return HitPreview(st.state);
617 }
static HitTestPreview HitPreview(const wxMouseState &state)
UIHandle::Result WaveTrackVZoomHandle::Release ( const TrackPanelMouseEvent event,
AudacityProject pProject,
wxWindow *  pParent 
)
overridevirtual

Implements UIHandle.

Definition at line 620 of file WaveTrackVZoomHandle.cpp.

References PopupMenuTable::BuildMenu(), TrackPanelMouseEvent::event, WaveTrack::GetDisplay(), Track::GetLink(), AudacityProject::GetTracks(), gPrefs, WaveformVRulerMenuTable::Instance(), SpectrumVRulerMenuTable::Instance(), kCaptureLostEventId, kZoom1to1, kZoomIn, kZoomOut, TrackList::Lock(), RefreshCode::RefreshAll, RefreshCode::RefreshNone, WaveTrack::Spectrum, and RefreshCode::UpdateVRuler.

622 {
623  using namespace RefreshCode;
624  auto pTrack = pProject->GetTracks()->Lock(mpTrack);
625  if (!pTrack)
626  return RefreshNone;
627 
628  const wxMouseEvent &event = evt.event;
629  const bool shiftDown = event.ShiftDown();
630  const bool rightUp = event.RightUp();
631 
632 
633  bool bVZoom;
634  gPrefs->Read(wxT("/GUI/VerticalZooming"), &bVZoom, false);
635 
636  // Popup menu...
637  if (
638  rightUp &&
639  !(event.ShiftDown() || event.CmdDown()))
640  {
641  InitMenuData data {
642  pTrack.get(), mRect, RefreshCode::RefreshNone, event.m_y
643  };
644 
645  PopupMenuTable *const pTable =
646  (pTrack->GetDisplay() == WaveTrack::Spectrum)
648  : (PopupMenuTable *) &WaveformVRulerMenuTable::Instance();
649  std::unique_ptr<PopupMenuTable::Menu>
650  pMenu(PopupMenuTable::BuildMenu(pParent, pTable, &data));
651 
652  // Accelerators only if zooming enabled.
653  if( !bVZoom )
654  {
655  wxMenuItemList & L = pMenu->GetMenuItems();
656  // let's iterate over the list in STL syntax
657  wxMenuItemList::iterator iter;
658  for (iter = L.begin(); iter != L.end(); ++iter)
659  {
660  wxMenuItem *pItem = *iter;
661  // Remove accelerator, if any.
662  pItem->SetItemLabel( (pItem->GetItemLabel() + "\t" ).BeforeFirst('\t') );
663  }
664  }
665 
666 
667  pParent->PopupMenu(pMenu.get(), event.m_x, event.m_y);
668 
669  return data.result;
670  }
671  else{
672  // Ignore Capture Lost event
673  bVZoom &= event.GetId() != kCaptureLostEventId;
674  // shiftDown | rightUp | ZoomKind
675  // T | T | 1to1
676  // T | F | Out
677  // F | - | In
678  if( bVZoom ){
679  if( shiftDown )
681  const auto partner = static_cast<WaveTrack *>(pTrack->GetLink());
682  DoZoom(pProject, pTrack.get(), partner,
683  shiftDown ? (rightUp ? kZoom1to1 : kZoomOut) : kZoomIn,
684  mRect, mZoomStart, mZoomEnd, !shiftDown);
685  }
686  }
687 
688  return UpdateVRuler | RefreshAll;
689 }
AudacityPrefs * gPrefs
Definition: Prefs.cpp:73
static SpectrumVRulerMenuTable & Instance()
const int kZoomOut
std::weak_ptr< WaveTrack > mpTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:60
static std::unique_ptr< Menu > BuildMenu(wxEvtHandler *pParent, PopupMenuTable *pTable, void *pUserData=NULL)
std::shared_ptr< Subclass > Lock(const std::weak_ptr< Subclass > &wTrack)
Definition: Track.h:734
const int kZoom1to1
static void DoZoom(AudacityProject *pProject, WaveTrack *pTrack, WaveTrack *partner, int ZoomKind, const wxRect &rect, int zoomStart, int zoomEnd, bool fixedMousePoint)
const int kCaptureLostEventId
TrackList * GetTracks()
Definition: Project.h:192
const int kZoomIn

Member Data Documentation

std::weak_ptr<WaveTrack> WaveTrackVZoomHandle::mpTrack
private

Definition at line 77 of file WaveTrackVZoomHandle.h.

Referenced by GetTrack().

wxRect WaveTrackVZoomHandle::mRect {}
private

Definition at line 80 of file WaveTrackVZoomHandle.h.

int WaveTrackVZoomHandle::mZoomEnd {}
private

Definition at line 79 of file WaveTrackVZoomHandle.h.

int WaveTrackVZoomHandle::mZoomStart {}
private

Definition at line 79 of file WaveTrackVZoomHandle.h.


The documentation for this class was generated from the following files: