Audacity  3.0.3
CommonTrackView.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3 Audacity: A Digital Audio Editor
4 
5 CommonTrackView.h
6 
7 Paul 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 
16 class SelectHandle;
17 class TimeShiftHandle;
18 
19 class AUDACITY_DLL_API CommonTrackView /* not final */ : public TrackView
20 {
21 public:
23 
24  // Delegates the handling to the related TCP cell
25  std::shared_ptr<TrackPanelCell> ContextMenuDelegate() override;
26 
27  // Cause certain overriding tool modes (Zoom; future ones?) to behave
28  // uniformly in all tracks, disregarding track contents.
29  // Do not further override this...
30  std::vector<UIHandlePtr> HitTest
31  (const TrackPanelMouseState &, const AudacityProject *pProject)
32  final override;
33 
35 
36  virtual int GetMinimizedHeight() const override;
37 
38 protected:
39  // Rather override this for subclasses:
40  virtual std::vector<UIHandlePtr> DetailedHitTest
41  (const TrackPanelMouseState &,
42  const AudacityProject *pProject, int currentTool, bool bMultiTool)
43  = 0;
44 
45  std::weak_ptr<SelectHandle> mSelectHandle;
46 
47 public:
48  std::weak_ptr<TimeShiftHandle> mTimeShiftHandle;
49 };
50 
51 #endif
TrackView::TrackView
TrackView(const TrackView &)=delete
CommonTrackView
Definition: CommonTrackView.h:20
TrackPanelCell::HitTest
virtual std::vector< UIHandlePtr > HitTest(const TrackPanelMouseState &state, const AudacityProject *pProject)=0
TrackView.h
CommonTrackView::mTimeShiftHandle
std::weak_ptr< TimeShiftHandle > mTimeShiftHandle
Definition: CommonTrackView.h:48
CommonTrackView::TimeShiftHitTest
void TimeShiftHitTest()
CommonTrackView::mSelectHandle
std::weak_ptr< SelectHandle > mSelectHandle
Definition: CommonTrackView.h:45
SelectHandle
Definition: SelectHandle.h:31
TimeShiftHandle
Definition: TimeShiftHandle.h:255
TrackPanelCell::ContextMenuDelegate
virtual std::shared_ptr< TrackPanelCell > ContextMenuDelegate()
Definition: TrackPanelCell.h:104
TrackView
Definition: TrackView.h:24
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:112
TrackPanelMouseState
Definition: TrackPanelMouseEvent.h:28
CommonTrackView::DetailedHitTest
virtual std::vector< UIHandlePtr > DetailedHitTest(const TrackPanelMouseState &, const AudacityProject *pProject, int currentTool, bool bMultiTool)=0
TrackView::GetMinimizedHeight
virtual int GetMinimizedHeight() const =0