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