Audacity 3.2.0
TimeTrackControls.h
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5TimeTrackControls.h
6
7Paul 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
21public:
22 explicit
23 TimeTrackControls( std::shared_ptr<Track> pTrack )
24 : CommonTrackControls( pTrack ) {}
25 ~TimeTrackControls() override;
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
47public:
49
50protected:
51 void InitUserData(void *pUserData) override;
52
53private:
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
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
TimeTrackControls & operator=(const TimeTrackControls &)=delete
std::vector< UIHandlePtr > HitTest(const TrackPanelMouseState &state, const AudacityProject *pProject) override
PopupMenuTable * GetMenuExtension(Track *pTrack) override
TimeTrackControls(std::shared_ptr< Track > pTrack)
TimeTrackControls(const TimeTrackControls &)=delete
static const int kRangeMin
static const int kRangeMax
~TimeTrackControls() override
void OnTimeTrackLog(wxCommandEvent &)
DECLARE_POPUP_MENU(TimeTrackMenuTable)
static TimeTrackMenuTable & Instance()
void OnTimeTrackLin(wxCommandEvent &)
void OnSetTimeTrackRange(wxCommandEvent &)
void InitUserData(void *pUserData) override
Called before the menu items are appended.
void OnTimeTrackLogInt(wxCommandEvent &)
CommonTrackControls::InitMenuData * mpData
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:110