Audacity  3.0.3
WaveformVRulerControls.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3 Audacity: A Digital Audio Editor
4 
5 WaveformVRulerControls.h
6 
7 Paul Licameli split from WaveTrackVRulerControls.h
8 
9 **********************************************************************/
10 
11 #ifndef __AUDACITY_WAVEFORM_VRULER_CONTROLS__
12 #define __AUDACITY_WAVEFORM_VRULER_CONTROLS__
13 
14 #include "../../../ui/TrackVRulerControls.h" // to inherit
15 
16 class WaveTrack;
18 
20 {
23 
24 public:
25  explicit
26  WaveformVRulerControls( const std::shared_ptr<TrackView> &pTrackView )
27  : TrackVRulerControls( pTrackView ) {}
29 
30  std::vector<UIHandlePtr> HitTest(
31  const TrackPanelMouseState &state,
32  const AudacityProject *) override;
33 
34  unsigned HandleWheelRotation(
35  const TrackPanelMouseEvent &event,
36  AudacityProject *pProject) override;
37  static unsigned DoHandleWheelRotation(
38  const TrackPanelMouseEvent &event,
39  AudacityProject *pProject, WaveTrack *wt);
40 
41 private:
42  // TrackPanelDrawable implementation
43  void Draw(
44  TrackPanelDrawingContext &context,
45  const wxRect &rect, unsigned iPass ) override;
46 
47  // TrackVRulerControls implementation
48  void UpdateRuler( const wxRect &rect ) override;
49 
50  static void DoUpdateVRuler( const wxRect &rect, const WaveTrack *wt );
51 
52  std::weak_ptr<WaveformVZoomHandle> mVZoomHandle;
53 };
54 
55 #endif
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:69
TrackPanelDrawingContext
Definition: TrackPanelDrawingContext.h:22
WaveformVRulerControls::WaveformVRulerControls
WaveformVRulerControls(const WaveformVRulerControls &)=delete
WaveformVZoomHandle
Definition: WaveformVZoomHandle.h:20
WaveformVRulerControls::~WaveformVRulerControls
~WaveformVRulerControls() override
WaveformVRulerControls
Definition: WaveformVRulerControls.h:20
WaveformVRulerControls::DoUpdateVRuler
static void DoUpdateVRuler(const wxRect &rect, const WaveTrack *wt)
Definition: WaveformVRulerControls.cpp:176
WaveformVRulerControls::HandleWheelRotation
unsigned HandleWheelRotation(const TrackPanelMouseEvent &event, AudacityProject *pProject) override
Definition: WaveformVRulerControls.cpp:49
TrackVRulerControls
Definition: TrackVRulerControls.h:25
WaveformVRulerControls::WaveformVRulerControls
WaveformVRulerControls(const std::shared_ptr< TrackView > &pTrackView)
Definition: WaveformVRulerControls.h:26
WaveformVRulerControls::DoHandleWheelRotation
static unsigned DoHandleWheelRotation(const TrackPanelMouseEvent &event, AudacityProject *pProject, WaveTrack *wt)
Definition: WaveformVRulerControls.cpp:60
WaveformVRulerControls::mVZoomHandle
std::weak_ptr< WaveformVZoomHandle > mVZoomHandle
Definition: WaveformVRulerControls.h:52
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92
WaveformVRulerControls::operator=
WaveformVRulerControls & operator=(const WaveformVRulerControls &)=delete
TrackPanelMouseEvent
Definition: TrackPanelMouseEvent.h:46
TrackPanelMouseState
Definition: TrackPanelMouseEvent.h:28
WaveformVRulerControls::UpdateRuler
void UpdateRuler(const wxRect &rect) override
Definition: WaveformVRulerControls.cpp:168
WaveformVRulerControls::HitTest
std::vector< UIHandlePtr > HitTest(const TrackPanelMouseState &state, const AudacityProject *) override
Definition: WaveformVRulerControls.cpp:27
WaveformVRulerControls::Draw
void Draw(TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override
Definition: WaveformVRulerControls.cpp:160