Audacity  3.0.3
WaveformView.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3 Audacity: A Digital Audio Editor
4 
5 WaveformView.h
6 
7 Paul Licameli split from WaveTrackView.h
8 
9 **********************************************************************/
10 
11 #ifndef __AUDACITY_WAVEFORM_VIEW__
12 #define __AUDACITY_WAVEFORM_VIEW__
13 
14 #include "WaveTrackView.h" // to inherit
15 
16 class WaveTrack;
17 class SampleHandle;
18 class EnvelopeHandle;
19 
20 class WaveformView final : public WaveTrackSubView
21 {
22  WaveformView( const WaveformView& ) = delete;
23  WaveformView &operator=( const WaveformView& ) = delete;
24 
25 public:
27  ~WaveformView() override;
28 
29  const Type &SubViewType() const override;
30 
31  std::shared_ptr<TrackVRulerControls> 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 WaveTrack *track,
41  const WaveClip* 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
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:69
WaveformView::SubViewType
const Type & SubViewType() const override
Definition: WaveformView.cpp:130
TrackPanelDrawingContext
Definition: TrackPanelDrawingContext.h:22
WaveformView::mSampleHandle
std::weak_ptr< SampleHandle > mSampleHandle
Definition: WaveformView.h:53
WaveformView::DoSetMinimized
void DoSetMinimized(bool minimized) override
Definition: WaveformView.cpp:109
EnvelopeHandle
Definition: EnvelopeHandle.h:28
WaveTrackSubView::WaveTrackSubView
WaveTrackSubView(WaveTrackView &waveTrackView)
Definition: WaveTrackView.cpp:866
WaveformView::DetailedHitTest
std::vector< UIHandlePtr > DetailedHitTest(const TrackPanelMouseState &state, const AudacityProject *pProject, int currentTool, bool bMultiTool) override
Definition: WaveformView.cpp:46
WaveTrackSubView
Definition: WaveTrackView.h:39
WaveTrackView.h
SampleHandle
Definition: SampleHandle.h:25
WaveformView::DoGetVRulerControls
std::shared_ptr< TrackVRulerControls > DoGetVRulerControls() override
Definition: WaveformView.cpp:135
WaveformView::~WaveformView
~WaveformView() override
WaveClip
This allows multiple clips to be a part of one WaveTrack.
Definition: WaveClip.h:175
WaveTrackSubViewType
Definition: WaveTrackViewConstants.h:91
WaveformView::DoDraw
static void DoDraw(TrackPanelDrawingContext &context, const WaveTrack *track, const WaveClip *selectedClip, const wxRect &rect, bool muted)
Definition: WaveformView.cpp:973
WaveformView
Definition: WaveformView.h:21
WaveformView::mEnvelopeHandle
std::weak_ptr< EnvelopeHandle > mEnvelopeHandle
Definition: WaveformView.h:54
WaveformView::WaveformView
WaveformView(const WaveformView &)=delete
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
TrackPanelMouseState
Definition: TrackPanelMouseEvent.h:28
WaveformView::operator=
WaveformView & operator=(const WaveformView &)=delete
WaveformView::Draw
void Draw(TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override
Definition: WaveformView.cpp:1011