Audacity 3.2.0
CommonTrackView.h
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5CommonTrackView.h
6
7Paul Licameli split from class TrackView
8
9**********************************************************************/
10
11#ifndef __AUDACITY_COMMON_TRACK_VIEW__
12#define __AUDACITY_COMMON_TRACK_VIEW__
13
14#include "TrackView.h" // to inherit
15
16class Envelope;
17class SelectHandle;
18class TimeShiftHandle;
19class ZoomInfo;
20
21class AUDACITY_DLL_API CommonTrackView /* not final */ : public TrackView
22{
23public:
25
26 // Delegates the handling to the related TCP cell
27 std::shared_ptr<TrackPanelCell> ContextMenuDelegate() override;
28
29 // Cause certain overriding tool modes (Zoom; future ones?) to behave
30 // uniformly in all tracks, disregarding track contents.
31 // Do not further override this...
32 std::vector<UIHandlePtr> HitTest
33 (const TrackPanelMouseState &, const AudacityProject *pProject)
34 final override;
35
37
38 virtual int GetMinimizedHeight() const override;
39
43 static void GetEnvelopeValues( const Envelope &env,
44 double aligned_time, double sampleDur,
45 double *buffer, int bufferLen, int leftOffset,
46 const ZoomInfo &zoomInfo);
47
48protected:
49 // Rather override this for subclasses:
50 virtual std::vector<UIHandlePtr> DetailedHitTest
51 (const TrackPanelMouseState &,
52 const AudacityProject *pProject, int currentTool, bool bMultiTool)
53 = 0;
54
55 std::weak_ptr<SelectHandle> mSelectHandle;
56
57public:
58 std::weak_ptr<TimeShiftHandle> mTimeShiftHandle;
59};
60
61#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
std::weak_ptr< TimeShiftHandle > mTimeShiftHandle
std::weak_ptr< SelectHandle > mSelectHandle
void TimeShiftHitTest()
virtual std::vector< UIHandlePtr > DetailedHitTest(const TrackPanelMouseState &, const AudacityProject *pProject, int currentTool, bool bMultiTool)=0
Piecewise linear or piecewise exponential function from double to double.
Definition: Envelope.h:72
virtual std::shared_ptr< TrackPanelCell > ContextMenuDelegate()
virtual std::vector< UIHandlePtr > HitTest(const TrackPanelMouseState &state, const AudacityProject *pProject)=0
TrackView(const TrackView &)=delete
virtual int GetMinimizedHeight() const =0