Audacity 3.2.0
WaveformVRulerControls.h
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5WaveformVRulerControls.h
6
7Paul Licameli split from WaveChannelVRulerControls.h
8
9**********************************************************************/
10
11#ifndef __AUDACITY_WAVEFORM_VRULER_CONTROLS__
12#define __AUDACITY_WAVEFORM_VRULER_CONTROLS__
13
14#include "../../../ui/ChannelVRulerControls.h" // to inherit
15
16class WaveChannel;
18
20{
23
24public:
25 explicit
26 WaveformVRulerControls(const std::shared_ptr<ChannelView> &pChannelView)
27 : ChannelVRulerControls{ pChannelView } {}
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, WaveChannel &wc);
40
41 std::shared_ptr<WaveChannel> FindWaveChannel();
42
43private:
44 // TrackPanelDrawable implementation
45 void Draw(
47 const wxRect &rect, unsigned iPass ) override;
48
49 // ChannelVRulerControls implementation
50 void UpdateRuler( const wxRect &rect ) override;
51
52 static void DoUpdateVRuler(const wxRect &rect, const WaveChannel &wc);
53
54 std::weak_ptr<WaveformVZoomHandle> mVZoomHandle;
55};
56
57#endif
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
void Draw(TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override
std::shared_ptr< WaveChannel > FindWaveChannel()
~WaveformVRulerControls() override
std::weak_ptr< WaveformVZoomHandle > mVZoomHandle
static void DoUpdateVRuler(const wxRect &rect, const WaveChannel &wc)
WaveformVRulerControls & operator=(const WaveformVRulerControls &)=delete
static unsigned DoHandleWheelRotation(const TrackPanelMouseEvent &event, AudacityProject *pProject, WaveChannel &wc)
unsigned HandleWheelRotation(const TrackPanelMouseEvent &event, AudacityProject *pProject) override
WaveformVRulerControls(const std::shared_ptr< ChannelView > &pChannelView)
std::vector< UIHandlePtr > HitTest(const TrackPanelMouseState &state, const AudacityProject *) override
WaveformVRulerControls(const WaveformVRulerControls &)=delete
void UpdateRuler(const wxRect &rect) override