| 1 |
/********************************************************************** |
| 2 |
|
| 3 |
Audacity: A Digital Audio Editor |
| 4 |
|
| 5 |
NoteTrackVRulerControls.h |
| 6 |
|
| 7 |
Paul Licameli split from TrackPanel.cpp |
| 8 |
|
| 9 |
**********************************************************************/ |
| 10 |
|
| 11 |
#ifndef __AUDACITY_NOTE_TRACK_VRULER_CONTROLS__ |
| 12 |
#define __AUDACITY_NOTE_TRACK_VRULER_CONTROLS__ |
| 13 |
|
| 14 |
#include "../../../ui/ChannelVRulerControls.h" |
| 15 |
|
| 16 |
class NoteTrack; |
| 17 |
class NoteTrackVZoomHandle; |
| 18 |
|
| 19 |
class NoteTrackVRulerControls final : public ChannelVRulerControls |
| 20 |
{ |
| 21 |
NoteTrackVRulerControls(const NoteTrackVRulerControls&) = delete; |
| 22 |
NoteTrackVRulerControls &operator=(const NoteTrackVRulerControls&) = delete; |
| 23 |
|
| 24 |
public: |
| 25 |
explicit |
| 26 |
NoteTrackVRulerControls(const std::shared_ptr<ChannelView> &pChannelView) |
| 27 |
: ChannelVRulerControls{ pChannelView } {} |
| 28 |
~NoteTrackVRulerControls(); |
| 29 |
|
| 30 |
std::vector<UIHandlePtr> HitTest |
| 31 |
(const TrackPanelMouseState &state, |
| 32 |
const AudacityProject *pProject) override; |
| 33 |
|
| 34 |
unsigned HandleWheelRotation |
| 35 |
(const TrackPanelMouseEvent &event, |
| 36 |
AudacityProject *pProject) override; |
| 37 |
|
| 38 |
private: |
| 39 |
std::shared_ptr<NoteTrack> FindNoteTrack(); |
| 40 |
|
| 41 |
// TrackPanelDrawable implementation |
| 42 |
void Draw( |
| 43 |
TrackPanelDrawingContext &context, |
| 44 |
const wxRect &rect, unsigned iPass ) override; |
| 45 |
|
| 46 |
// ChannelVRulerControls implementation |
| 47 |
void UpdateRuler( const wxRect &rect ) override; |
| 48 |
|
| 49 |
std::weak_ptr<NoteTrackVZoomHandle> mVZoomHandle; |
| 50 |
}; |
| 51 |
|
| 52 |
#endif |