Audacity  3.0.3
TimeTrackControls.h
Go to the documentation of this file.
1 /**********************************************************************
2 
3 Audacity: A Digital Audio Editor
4 
5 TimeTrackControls.h
6 
7 Paul Licameli split from TrackPanel.cpp
8 
9 **********************************************************************/
10 
11 #ifndef __AUDACITY_TIME_TRACK_CONTROLS__
12 #define __AUDACITY_TIME_TRACK_CONTROLS__
13 
14 #include "../../ui/CommonTrackControls.h" // to inherit
15 
17 {
20 
21 public:
22  explicit
23  TimeTrackControls( std::shared_ptr<Track> pTrack )
24  : CommonTrackControls( pTrack ) {}
26 
27  std::vector<UIHandlePtr> HitTest
28  (const TrackPanelMouseState &state,
29  const AudacityProject *pProject) override;
30 
31  PopupMenuTable *GetMenuExtension(Track *pTrack) override;
32 
33  static const int kRangeMin {10};
34  static const int kRangeMax {1000};
35 };
36 
37 #include "../../../widgets/PopupMenuTable.h"
38 
40 {
42  : PopupMenuTable{ "TimeTrack" }
43  {}
44 
46 
47 public:
48  static TimeTrackMenuTable &Instance();
49 
50 protected:
51  void InitUserData(void *pUserData) override;
52 
53 private:
55 
56  void OnSetTimeTrackRange(wxCommandEvent & /*event*/);
57  void OnTimeTrackLin(wxCommandEvent & /*event*/);
58  void OnTimeTrackLog(wxCommandEvent & /*event*/);
59  void OnTimeTrackLogInt(wxCommandEvent & /*event*/);
60 };
61 
62 #endif
TimeTrackMenuTable::OnSetTimeTrackRange
void OnSetTimeTrackRange(wxCommandEvent &)
Definition: TimeTrackControls.cpp:52
TimeTrackMenuTable::mpData
CommonTrackControls::InitMenuData * mpData
Definition: TimeTrackControls.h:54
TimeTrackMenuTable::InitUserData
void InitUserData(void *pUserData) override
Called before the menu items are appended.
Definition: TimeTrackControls.cpp:47
TimeTrackControls::HitTest
std::vector< UIHandlePtr > HitTest(const TrackPanelMouseState &state, const AudacityProject *pProject) override
Definition: TimeTrackControls.cpp:27
TimeTrackControls::TimeTrackControls
TimeTrackControls(const TimeTrackControls &)=delete
TimeTrackControls::operator=
TimeTrackControls & operator=(const TimeTrackControls &)=delete
PopupMenuTable
Definition: PopupMenuTable.h:115
TimeTrackMenuTable::TimeTrackMenuTable
TimeTrackMenuTable()
Definition: TimeTrackControls.h:41
CommonTrackControls
Definition: CommonTrackControls.h:27
TimeTrackControls
Definition: TimeTrackControls.h:17
TimeTrackMenuTable::OnTimeTrackLin
void OnTimeTrackLin(wxCommandEvent &)
Definition: TimeTrackControls.cpp:90
TimeTrackMenuTable
Definition: TimeTrackControls.h:40
TimeTrackControls::kRangeMax
static const int kRangeMax
Definition: TimeTrackControls.h:34
TimeTrackControls::GetMenuExtension
PopupMenuTable * GetMenuExtension(Track *pTrack) override
Definition: TimeTrackControls.cpp:162
CommonTrackControls::InitMenuData
Definition: CommonTrackControls.h:34
TimeTrackControls::~TimeTrackControls
~TimeTrackControls()
Definition: TimeTrackControls.cpp:22
TimeTrackMenuTable::OnTimeTrackLog
void OnTimeTrackLog(wxCommandEvent &)
Definition: TimeTrackControls.cpp:102
TimeTrackControls::TimeTrackControls
TimeTrackControls(std::shared_ptr< Track > pTrack)
Definition: TimeTrackControls.h:23
Track
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:224
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
TimeTrackMenuTable::OnTimeTrackLogInt
void OnTimeTrackLogInt(wxCommandEvent &)
Definition: TimeTrackControls.cpp:114
TrackPanelMouseState
Definition: TrackPanelMouseEvent.h:28
TimeTrackMenuTable::Instance
static TimeTrackMenuTable & Instance()
Definition: TimeTrackControls.cpp:41
TimeTrackMenuTable::DECLARE_POPUP_MENU
DECLARE_POPUP_MENU(TimeTrackMenuTable)
TimeTrackControls::kRangeMin
static const int kRangeMin
Definition: TimeTrackControls.h:33