Audacity  3.0.3
Public Member Functions | Static Public Member Functions | List of all members
TrackControls Class Referenceabstract

#include <TrackControls.h>

Inheritance diagram for TrackControls:
Collaboration diagram for TrackControls:

Public Member Functions

 TrackControls (std::shared_ptr< Track > pTrack)
virtual ~TrackControls ()=0
- Public Member Functions inherited from CommonTrackCell
 CommonTrackCell (const std::shared_ptr< Track > &pTrack)
 ~CommonTrackCell ()
virtual void CopyTo (Track &track) const
std::shared_ptr< TrackDoFindTrack () override
virtual void Reparent (const std::shared_ptr< Track > &parent)
virtual void WriteXMLAttributes (XMLWriter &) const
virtual bool HandleXMLAttribute (const wxChar *attr, const wxChar *value)
- Public Member Functions inherited from CommonTrackPanelCell
 CommonTrackPanelCell ()
virtual ~CommonTrackPanelCell ()=0
HitTestPreview DefaultPreview (const TrackPanelMouseState &, const AudacityProject *) override
std::shared_ptr< TrackFindTrack ()
std::shared_ptr< const TrackFindTrack () const
virtual std::vector< MenuItemGetMenuItems (const wxRect &rect, const wxPoint *pPosition, AudacityProject *pProject)
 Return a list of items for DoContextMenu() (empties for separators) More...
- Public Member Functions inherited from TrackPanelCell
 TrackPanelCell ()=default
 TrackPanelCell (const TrackPanelCell &) PROHIBITED
TrackPanelCelloperator= (const TrackPanelCell &) PROHIBITED
virtual ~TrackPanelCell ()=0
virtual std::vector< UIHandlePtrHitTest (const TrackPanelMouseState &state, const AudacityProject *pProject)=0
virtual std::shared_ptr< TrackPanelCellContextMenuDelegate ()
virtual unsigned CaptureKey (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
virtual unsigned KeyDown (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
virtual unsigned KeyUp (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
virtual unsigned Char (wxKeyEvent &event, ViewInfo &viewInfo, wxWindow *pParent, AudacityProject *project)
virtual unsigned LoseFocus (AudacityProject *project)
- Public Member Functions inherited from TrackPanelNode
 TrackPanelNode ()
virtual ~TrackPanelNode ()=0
- Public Member Functions inherited from TrackPanelDrawable
virtual ~TrackPanelDrawable ()=0
virtual void Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass)
virtual wxRect DrawingArea (TrackPanelDrawingContext &context, const wxRect &rect, const wxRect &panelRect, unsigned iPass)

Static Public Member Functions

static TrackControlsGet (Track &track)
static const TrackControlsGet (const Track &track)
- Static Public Member Functions inherited from CommonTrackPanelCell
static Hook InstallMouseWheelHook (const Hook &hook)
- Static Public Member Functions inherited from TrackPanelDrawable
static wxRect MaximizeWidth (const wxRect &rect, const wxRect &panelRect)
static wxRect MaximizeHeight (const wxRect &rect, const wxRect &panelRect)

Additional Inherited Members

- Public Types inherited from CommonTrackPanelCell
using Hook = std::function< unsigned(const TrackPanelMouseEvent &evt, AudacityProject *pProject) >
- Protected Member Functions inherited from CommonTrackPanelCell
unsigned DoContextMenu (const wxRect &rect, wxWindow *pParent, const wxPoint *pPosition, AudacityProject *pProject) override
unsigned HandleWheelRotation (const TrackPanelMouseEvent &event, AudacityProject *pProject) override

Detailed Description

Definition at line 18 of file TrackControls.h.

Constructor & Destructor Documentation

◆ TrackControls()

TrackControls::TrackControls ( std::shared_ptr< Track pTrack)

Definition at line 16 of file TrackControls.cpp.

17  : CommonTrackCell{ pTrack }
18 {
19 }

◆ ~TrackControls()

TrackControls::~TrackControls ( )
pure virtual

Definition at line 21 of file TrackControls.cpp.

22 {
23 }

Member Function Documentation

◆ Get() [1/2]

const TrackControls & TrackControls::Get ( const Track track)

Definition at line 35 of file TrackControls.cpp.

36 {
37  return Get( const_cast< Track& >( track ) );
38 }

References Get().

Here is the call graph for this function:

◆ Get() [2/2]

TrackControls & TrackControls::Get ( Track track)

Definition at line 25 of file TrackControls.cpp.

26 {
27  auto pControls =
28  std::static_pointer_cast<TrackControls>( track.GetTrackControls() );
29  if (!pControls)
30  // create on demand
31  track.SetTrackControls( pControls = DoGetControls::Call( track ) );
32  return *pControls;
33 }

Referenced by anonymous_namespace{TrackPanel.cpp}::LabeledChannelGroup::Children(), CommonTrackView::ContextMenuDelegate(), TrackInfo::DrawItems(), WaveTrackControls::GainSlider(), Get(), PlayableTrackControls::GetMuteSoloRect(), and WaveTrackControls::PanSlider().

Here is the caller graph for this function:

The documentation for this class was generated from the following files:
static Return Call(This &obj, Arguments &&...arguments)
Invoke the method – but only after static initialization time.
Definition: AttachedVirtualFunction.h:223
static TrackControls & Get(Track &track)
Definition: TrackControls.cpp:25
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:239
void SetTrackControls(const std::shared_ptr< CommonTrackCell > &pControls)
Definition: Track.cpp:159
Definition: CommonTrackPanelCell.h:99
const std::shared_ptr< CommonTrackCell > & GetTrackControls()
Definition: Track.cpp:154