Audacity  3.0.3
Public Member Functions | Private Attributes | List of all members
CommonTrackCell Class Reference

#include <CommonTrackPanelCell.h>

Inheritance diagram for CommonTrackCell:
[legend]
Collaboration diagram for CommonTrackCell:
[legend]

Public Member Functions

 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)
 

Private Attributes

std::weak_ptr< TrackmwTrack
 

Additional Inherited Members

- Public Types inherited from CommonTrackPanelCell
using Hook = std::function< unsigned(const TrackPanelMouseEvent &evt, AudacityProject *pProject) >
 
- 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)
 
- 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 97 of file CommonTrackPanelCell.h.

Constructor & Destructor Documentation

◆ CommonTrackCell()

CommonTrackCell::CommonTrackCell ( const std::shared_ptr< Track > &  pTrack)
explicit

Definition at line 132 of file CommonTrackPanelCell.cpp.

133  : mwTrack { parent }
134 {}

◆ ~CommonTrackCell()

CommonTrackCell::~CommonTrackCell ( )
default

Member Function Documentation

◆ CopyTo()

void CommonTrackCell::CopyTo ( Track track) const
virtual

Reimplemented in TrackView, WaveTrackView, and LabelTrackView.

Definition at line 138 of file CommonTrackPanelCell.cpp.

139 {
140 }

◆ DoFindTrack()

std::shared_ptr< Track > CommonTrackCell::DoFindTrack ( )
overridevirtual

Implements CommonTrackPanelCell.

Definition at line 147 of file CommonTrackPanelCell.cpp.

148 {
149  return mwTrack.lock();
150 }

References mwTrack.

Referenced by NoteTrackView::GetAffordanceControls().

Here is the caller graph for this function:

◆ HandleXMLAttribute()

bool CommonTrackCell::HandleXMLAttribute ( const wxChar *  attr,
const wxChar *  value 
)
virtual

Reimplemented in TrackView.

Definition at line 156 of file CommonTrackPanelCell.cpp.

157 {
158  return false;
159 }

◆ Reparent()

void CommonTrackCell::Reparent ( const std::shared_ptr< Track > &  parent)
virtual

Reimplemented in WaveTrackView, and LabelTrackView.

Definition at line 142 of file CommonTrackPanelCell.cpp.

143 {
144  mwTrack = parent;
145 }

References mwTrack.

Referenced by LabelTrackView::Reparent(), and WaveTrackView::Reparent().

Here is the caller graph for this function:

◆ WriteXMLAttributes()

void CommonTrackCell::WriteXMLAttributes ( XMLWriter ) const
virtual

Reimplemented in TrackView.

Definition at line 152 of file CommonTrackPanelCell.cpp.

153 {
154 }

Member Data Documentation

◆ mwTrack

std::weak_ptr< Track > CommonTrackCell::mwTrack
private

Definition at line 120 of file CommonTrackPanelCell.h.

Referenced by DoFindTrack(), and Reparent().


The documentation for this class was generated from the following files:
CommonTrackCell::mwTrack
std::weak_ptr< Track > mwTrack
Definition: CommonTrackPanelCell.h:120