| 1 |
/********************************************************************** |
| 2 |
|
| 3 |
Audacity: A Digital Audio Editor |
| 4 |
|
| 5 |
WaveformView.h |
| 6 |
|
| 7 |
Paul Licameli split from WaveChannelView.h |
| 8 |
|
| 9 |
**********************************************************************/ |
| 10 |
|
| 11 |
#ifndef __AUDACITY_WAVEFORM_VIEW__ |
| 12 |
#define __AUDACITY_WAVEFORM_VIEW__ |
| 13 |
|
| 14 |
#include "WaveChannelView.h" // to inherit |
| 15 |
|
| 16 |
class WaveTrack; |
| 17 |
class SampleHandle; |
| 18 |
class EnvelopeHandle; |
| 19 |
|
| 20 |
class WaveformView final : public WaveChannelSubView |
| 21 |
{ |
| 22 |
WaveformView(const WaveformView&) = delete; |
| 23 |
WaveformView &operator=(const WaveformView&) = delete; |
| 24 |
|
| 25 |
public: |
| 26 |
using WaveChannelSubView::WaveChannelSubView; |
| 27 |
~WaveformView() override; |
| 28 |
|
| 29 |
const Type &SubViewType() const override; |
| 30 |
|
| 31 |
std::shared_ptr<ChannelVRulerControls> DoGetVRulerControls() override; |
| 32 |
|
| 33 |
|
| 34 |
private: |
| 35 |
// TrackPanelDrawable implementation |
| 36 |
void Draw( |
| 37 |
TrackPanelDrawingContext &context, |
| 38 |
const wxRect &rect, unsigned iPass ) override; |
| 39 |
static void DoDraw(TrackPanelDrawingContext &context, |
| 40 |
const WaveChannel &channel, |
| 41 |
const WaveTrack::Interval* selectedClip, |
| 42 |
const wxRect & rect, |
| 43 |
bool muted); |
| 44 |
|
| 45 |
std::vector<UIHandlePtr> DetailedHitTest( |
| 46 |
const TrackPanelMouseState &state, |
| 47 |
const AudacityProject *pProject, int currentTool, bool bMultiTool ) |
| 48 |
override; |
| 49 |
|
| 50 |
protected: |
| 51 |
void DoSetMinimized( bool minimized ) override; |
| 52 |
|
| 53 |
std::weak_ptr<SampleHandle> mSampleHandle; |
| 54 |
std::weak_ptr<EnvelopeHandle> mEnvelopeHandle; |
| 55 |
}; |
| 56 |
|
| 57 |
#endif |