Audacity 3.2.0
TrackControls.cpp
Go to the documentation of this file.
1/**********************************************************************
2
3Audacity: A Digital Audio Editor
4
5TrackControls.cpp
6
7Paul Licameli split from TrackPanel.cpp
8
9**********************************************************************/
10
11
12#include "TrackControls.h"
13
14#include "Track.h"
15
16TrackControls::TrackControls(std::shared_ptr<Track> pTrack)
17 : CommonTrackCell{ pTrack }
18{
19}
20
22{
23}
24
26 []( Track &track ){
27 return DoGetControls::Call( track );
28 }
29};
30
32{
33 return track.AttachedObjects::Get< TrackControls >( key );
34}
35
37{
38 return Get( const_cast< Track & >( track ) );
39}
40
42 return nullptr;
43}
declares abstract base class Track, TrackList, and iterators over TrackList
static const AttachedTrackObjects::RegisteredFactory key
DEFINE_ATTACHED_VIRTUAL(DoGetControls)
Class template generates single-dispatch, open method registry tables.
static Return Call(This &obj, Arguments ...arguments)
Invoke the method – but only after static initialization time.
Client code makes static instance from a factory of attachments; passes it to Get or Find as a retrie...
Definition: ClientData.h:275
TrackControls(std::shared_ptr< Track > pTrack)
static TrackControls & Get(Track &track)
virtual ~TrackControls()=0
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:110