Audacity 3.2.0
Classes | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
TrackPanel Class Referencefinal

The TrackPanel class coordinates updates and operations on the main part of the screen which contains multiple tracks. More...

#include <TrackPanel.h>

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

Classes

class  AudacityTimer
 Timer class dedicated to informing the TrackPanel that it is time to refresh some aspect of the screen. More...
 

Public Member Functions

 TrackPanel (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, const std::shared_ptr< TrackList > &tracks, ViewInfo *viewInfo, AudacityProject *project, AdornedRulerPanel *ruler)
 
virtual ~TrackPanel ()
 
void UpdatePrefs () override
 
void OnAudioIO (AudioIOEvent)
 
void OnPaint (wxPaintEvent &event)
 
void OnMouseEvent (wxMouseEvent &event)
 
void OnKeyDown (wxKeyEvent &event)
 
void OnTrackListResizing (const TrackListEvent &event)
 
void OnTrackListDeletion ()
 
void OnEnsureVisible (const TrackListEvent &event)
 
void UpdateViewIfNoTracks ()
 
double GetMostRecentXPos ()
 
void OnSize (wxSizeEvent &)
 
void OnIdle (wxIdleEvent &event)
 
void OnTimer (wxTimerEvent &event)
 AS: This gets called on our wx timer events. More...
 
void OnSyncLockChange (struct SyncLockChangeMessage)
 
void OnTrackFocusChange (struct TrackFocusChangeMessage)
 
void OnUndoReset (struct UndoRedoMessage)
 
void Refresh (bool eraseBackground=true, const wxRect *rect=(const wxRect *) NULL) override
 
void RefreshTrack (Track *trk, bool refreshbacking=true)
 
void HandlePageUpKey ()
 
void HandlePageDownKey ()
 
AudacityProjectGetProject () const override
 
void OnTrackMenu (Track *t=NULL)
 
void VerticalScroll (float fracPosition)
 
TrackPanelCellGetFocusedCell () override
 
void SetFocusedCell () override
 
void UpdateVRulers ()
 
void UpdateVRuler (Track *t)
 
void UpdateTrackVRuler (Track &t)
 
void UpdateVRulerSize ()
 
size_t GetSelectedTrackCount () const
 
void MakeParentRedrawScrollbars ()
 
wxRect FindTrackRect (const Track *target)
 
wxRect FindFocusedTrackRect (const Track *target)
 
std::vector< wxRect > FindRulerRects (const Channel &target)
 
const TrackListGetTracks () const
 
TrackListGetTracks ()
 
ViewInfoGetViewInfo ()
 
TrackPanelListenerGetListener ()
 
AdornedRulerPanelGetRuler ()
 
void SetBackgroundCell (const std::shared_ptr< CommonTrackPanelCell > &pCell)
 
std::shared_ptr< CommonTrackPanelCellGetBackgroundCell ()
 
- Public Member Functions inherited from CellularPanel
 CellularPanel (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, ViewInfo *viewInfo, long style=wxTAB_TRAVERSAL|wxNO_BORDER)
 
 ~CellularPanel () override
 
virtual AudacityProjectGetProject () const =0
 
virtual std::shared_ptr< TrackPanelNodeRoot ()=0
 
virtual TrackPanelCellGetFocusedCell ()=0
 
virtual void SetFocusedCell ()=0
 
virtual void ProcessUIHandleResult (TrackPanelCell *pClickedCell, TrackPanelCell *pLatestCell, unsigned refreshResult)=0
 
virtual void UpdateStatusMessage (const TranslatableString &)=0
 
void Visit (Visitor &visitor)
 
void VisitCells (const SimpleCellVisitor &visitor)
 
void VisitPreorder (const SimpleNodeVisitor &visitor)
 
void VisitPostorder (const SimpleNodeVisitor &visitor)
 
FoundCell FindCell (int mouseX, int mouseY)
 
wxRect FindRect (const TrackPanelCell &cell)
 
wxRect FindRect (const std::function< bool(TrackPanelNode &) > &pred)
 
UIHandlePtr Target ()
 
std::shared_ptr< TrackPanelCellLastCell () const
 
bool IsMouseCaptured ()
 Determines if a modal tool is active. More...
 
wxCoord MostRecentXCoord () const
 
void HandleCursorForPresentMouseState (bool doHit=true)
 
void Draw (TrackPanelDrawingContext &context, unsigned nPasses)
 
- Public Member Functions inherited from OverlayPanel
 OverlayPanel (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style=wxTAB_TRAVERSAL|wxNO_BORDER)
 
void AddOverlay (const std::weak_ptr< Overlay > &pOverlay)
 
void ClearOverlays ()
 
void DrawOverlays (bool repaint_all, wxDC *pDC=nullptr)
 
- Public Member Functions inherited from BackedPanel
 BackedPanel (wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, long style)
 
 ~BackedPanel ()
 
wxDC & GetBackingDC ()
 
wxDC & GetBackingDCForRepaint ()
 
void ResizeBacking ()
 
void RepairBitmap (wxDC &dc, wxCoord x, wxCoord y, wxCoord width, wxCoord height)
 
void DisplayBitmap (wxDC &dc)
 
void OnSize (wxSizeEvent &event)
 
- Public Member Functions inherited from wxPanelWrapper
 wxPanelWrapper ()
 
 wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
bool Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
void SetLabel (const TranslatableString &label)
 
void SetName (const TranslatableString &name)
 
void SetToolTip (const TranslatableString &toolTip)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxPanel >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 
- Public Member Functions inherited from NonKeystrokeInterceptingWindow
virtual ~NonKeystrokeInterceptingWindow ()
 

Static Public Member Functions

static TrackPanelGet (AudacityProject &project)
 
static const TrackPanelGet (const AudacityProject &project)
 
static void Destroy (AudacityProject &project)
 

Protected Member Functions

bool IsAudioActive ()
 
void UpdateSelectionDisplay ()
 
std::shared_ptr< TrackPanelNodeRoot () override
 
void DrawTracks (wxDC *dc)
 
void ProcessUIHandleResult (TrackPanelCell *pClickedTrack, TrackPanelCell *pLatestCell, unsigned refreshResult) override
 
void UpdateStatusMessage (const TranslatableString &status) override
 
- Protected Member Functions inherited from CellularPanel
bool HasEscape ()
 
bool CancelDragging (bool escaping)
 
void DoContextMenu (TrackPanelCell *pCell=nullptr)
 
void ClearTargets ()
 

Protected Attributes

Observer::Subscription mTrackListSubscription
 
Observer::Subscription mAudioIOSubscription
 
Observer::Subscription mUndoSubscription
 
Observer::Subscription mFocusChangeSubscription
 
Observer::Subscription mRealtimeEffectManagerSubscription
 
Observer::Subscription mSyncLockSubscription
 
Observer::Subscription mProjectRulerInvalidatedSubscription
 
TrackPanelListenermListener
 
std::shared_ptr< TrackListmTracks
 
AdornedRulerPanelmRuler
 
std::unique_ptr< TrackArtistmTrackArtist
 
TrackPanel::AudacityTimer mTimer
 
int mTimeCount
 
bool mRefreshBacking
 
SelectedRegion mLastDrawnSelectedRegion {}
 
std::shared_ptr< CommonTrackPanelCellmpBackground
 
- Protected Attributes inherited from CellularPanel
ViewInfomViewInfo
 
wxMouseState mLastMouseState
 

Additional Inherited Members

- Public Types inherited from CellularPanel
using SimpleCellVisitor = std::function< void(const wxRect &rect, TrackPanelCell &cell) >
 
using SimpleNodeVisitor = std::function< void(const wxRect &rect, TrackPanelNode &node) >
 
- Private Member Functions inherited from PrefsListener
 PrefsListener ()
 
virtual ~PrefsListener ()
 
virtual void UpdatePrefs ()=0
 
virtual void UpdateSelectedPrefs (int id)
 
- Static Private Member Functions inherited from PrefsListener
static void Broadcast (int id=0)
 Call this static function to notify all PrefsListener objects. More...
 

Detailed Description

The TrackPanel class coordinates updates and operations on the main part of the screen which contains multiple tracks.

It uses many other classes, but in particular it uses the TrackInfo class to draw the controls area on the left of a track, and the TrackArtist class to draw the actual waveforms.

Note that in some of the older code here, "Label" means the TrackInfo plus the vertical ruler. Confusing relative to LabelTrack labels.

The TrackPanel manages multiple tracks and their TrackInfos.

Note that with stereo tracks there will be one TrackInfo being used by two wavetracks.

This is a diagram of TrackPanel's division of one (non-stereo) track rectangle. Total height equals ChannelView::GetHeight()'s value. Total width is the wxWindow's width. Each character that is not . represents one pixel.

Inset space of this track, and top inset of the next track, are used to draw the focus highlight.

Top inset of the right channel of a stereo track, and bottom shadow line of the left channel, are used for the channel separator.

"Margin" is a term used for inset plus border (top and left) or inset plus shadow plus border (right and bottom).

GetVRulerOffset() counts columns from the left edge up to and including controls, and is a constant.

GetVRulerWidth() is variable – all tracks have the same ruler width at any time, but that width may be adjusted when tracks change their vertical scales.

GetLeftOffset() counts columns up to and including the VRuler and one more, the "one pixel" column.

Cell for label has a rectangle that OMITS left, top, and bottom margins

Cell for vruler has a rectangle right of the label, up to and including the One Pixel column, and OMITS top and bottom margins

Cell() for track returns a rectangle with x == GetLeftOffset(), and OMITS right, top, and bottom margins

+------------— ... ---— ... ------------------— ... ... ----------—+

Top Inset
+---------— ... ---— ... ------------------— ... ... -------—+

| L|+-Border-— ... ---— ... ------------------— ... ... -Border-+ |R | | e||+-------— ... -++— ... -+++--------------— ... ... ----—+| |i | | f|B| || ||| |BS|g | | t|o| Controls || V |O| The good stuff |oh|h | | |r| || R |n| |ra|t | | I|d| || u |e| |dd| | | n|e| || l | | |eo|I | | s|r| || e |P| |rw|n | | e||| || r |i| ||||s | | t||| || |x| ||||e | | ||| || |e| ||||t | | ||| || |l| |||| | | ||| || ||| |||| |

. ... .. ... .... . . ... .. ... .... . . ... .. ... .... .

| ||| || ||| |||| | | ||+-------— -++– ... -+++--------------— ... ... ----—+||| | | |+-Border-— ... --— ... ------------------— ... ... -Border-+|| | | | Shadow-— ... --— ... ------------------— ... ... –Shadow-+| |

Definition at line 62 of file TrackPanel.h.

Constructor & Destructor Documentation

◆ TrackPanel()

TrackPanel::TrackPanel ( wxWindow *  parent,
wxWindowID  id,
const wxPoint &  pos,
const wxSize &  size,
const std::shared_ptr< TrackList > &  tracks,
ViewInfo viewInfo,
AudacityProject project,
AdornedRulerPanel ruler 
)

Definition at line 255 of file TrackPanel.cpp.

262 : CellularPanel(parent, id, pos, size, viewInfo,
263 wxWANTS_CHARS | wxNO_BORDER),
266 mRuler(ruler),
267 mTrackArtist(nullptr),
268 mRefreshBacking(false)
269#ifndef __WXGTK__ //Get rid if this pragma for gtk
270#pragma warning( default: 4355 )
271#endif
272{
273 SetLayoutDirection(wxLayout_LeftToRight);
274 SetLabel(XO("Track Panel"));
275 SetName(XO("Track Panel"));
276 SetBackgroundStyle(wxBG_STYLE_PAINT);
277
278 {
279 auto pAx = std::make_unique <TrackPanelAx>( *project );
280 pAx->SetWindow( this );
281 wxWeakRef< TrackPanel > weakThis{ this };
282 pAx->SetFinder(
283 [weakThis]( const Track &track ) -> wxRect {
284 if (weakThis)
285 return weakThis->FindTrackRect( &track );
286 return {};
287 }
288 );
289 TrackFocus::Get( *GetProject() ).SetAccessible(
290 *this, std::move( pAx ) );
291 }
292
293 mTrackArtist = std::make_unique<TrackArtist>( this );
294
295 mTimeCount = 0;
296 mTimer.parent = this;
297 // Timer is started after the window is visible
298 ProjectWindow::Get( *GetProject() ).Bind(wxEVT_IDLE,
299 &TrackPanel::OnIdle, this);
300
301 // Register for tracklist updates
303 mTracks->Subscribe([this](const TrackListEvent &event){
304 switch (event.mType) {
305 case TrackListEvent::RESIZING:
306 case TrackListEvent::ADDITION:
307 OnTrackListResizing(event); break;
308 case TrackListEvent::DELETION:
309 OnTrackListDeletion(); break;
310 case TrackListEvent::TRACK_REQUEST_VISIBLE:
311 OnEnsureVisible(event); break;
312 default:
313 break;
314 }
315 });
316
317 auto theProject = GetProject();
320
322 .Subscribe(*this, &TrackPanel::OnTrackFocusChange);
323
326
329
331 .Subscribe([this](const RealtimeEffectManagerMessage& msg)
332 {
333 if (auto pTrack = dynamic_cast<Track *>(msg.group))
334 //update "effects" button
335 RefreshTrack(pTrack);
336 });
337
339 ProjectTimeRuler::Get(*theProject).GetRuler().Subscribe([this](auto mode) { Refresh(); });
340
341 UpdatePrefs();
342}
XO("Cut/Copy/Paste")
const auto tracks
const auto project
static AudioIO * Get()
Definition: AudioIO.cpp:123
CellularPanel(wxWindow *parent, wxWindowID id, const wxPoint &pos, const wxSize &size, ViewInfo *viewInfo, long style=wxTAB_TRAVERSAL|wxNO_BORDER)
Subscription Subscribe(Callback callback)
Connect a callback to the Publisher; later-connected are called earlier.
Definition: Observer.h:199
static ProjectTimeRuler & Get(AudacityProject &project)
static ProjectWindow & Get(AudacityProject &project)
static RealtimeEffectManager & Get(AudacityProject &project)
static SyncLockState & Get(AudacityProject &project)
Definition: SyncLock.cpp:26
Track * Get()
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:123
void UpdatePrefs() override
Definition: TrackPanel.cpp:355
Observer::Subscription mProjectRulerInvalidatedSubscription
Definition: TrackPanel.h:198
AdornedRulerPanel * mRuler
Definition: TrackPanel.h:204
TrackPanelListener * mListener
Definition: TrackPanel.h:200
std::shared_ptr< TrackList > mTracks
Definition: TrackPanel.h:202
Observer::Subscription mAudioIOSubscription
Definition: TrackPanel.h:193
AudacityProject * GetProject() const override
Definition: TrackPanel.cpp:366
Observer::Subscription mTrackListSubscription
Definition: TrackPanel.h:192
void Refresh(bool eraseBackground=true, const wxRect *rect=(const wxRect *) NULL) override
Definition: TrackPanel.cpp:784
void OnTrackFocusChange(struct TrackFocusChangeMessage)
Observer::Subscription mRealtimeEffectManagerSubscription
Definition: TrackPanel.h:196
Observer::Subscription mSyncLockSubscription
Definition: TrackPanel.h:197
bool mRefreshBacking
Definition: TrackPanel.h:226
TrackPanel::AudacityTimer mTimer
void OnUndoReset(struct UndoRedoMessage)
Definition: TrackPanel.cpp:466
Observer::Subscription mUndoSubscription
Definition: TrackPanel.h:194
int mTimeCount
Definition: TrackPanel.h:224
void OnAudioIO(AudioIOEvent)
Definition: TrackPanel.cpp:807
void OnSyncLockChange(struct SyncLockChangeMessage)
Definition: TrackPanel.cpp:461
void OnIdle(wxIdleEvent &event)
Definition: TrackPanel.cpp:388
Observer::Subscription mFocusChangeSubscription
Definition: TrackPanel.h:195
void RefreshTrack(Track *trk, bool refreshbacking=true)
Definition: TrackPanel.cpp:747
std::unique_ptr< TrackArtist > mTrackArtist
Definition: TrackPanel.h:206
static UndoManager & Get(AudacityProject &project)
Definition: UndoManager.cpp:71
void SetLabel(const TranslatableString &label)
Posted when effect is being added or removed to/from channel group or project.
ChannelGroup * group
null, if changes happened in the project scope
Notification of changes in individual tracks of TrackList, or of TrackList's composition.
Definition: Track.h:937
const Type mType
Definition: Track.h:974

References AudioIO::Get(), TrackFocus::Get(), UndoManager::Get(), RealtimeEffectManager::Get(), SyncLockState::Get(), ProjectTimeRuler::Get(), ProjectWindow::Get(), GetProject(), ProjectTimeRuler::GetRuler(), RealtimeEffectManagerMessage::group, mAudioIOSubscription, mFocusChangeSubscription, mProjectRulerInvalidatedSubscription, mRealtimeEffectManagerSubscription, mSyncLockSubscription, mTimeCount, mTimer, mTrackArtist, mTrackListSubscription, mTracks, TrackListEvent::mType, mUndoSubscription, OnAudioIO(), OnIdle(), OnSyncLockChange(), OnTrackFocusChange(), OnUndoReset(), TrackPanel::AudacityTimer::parent, project, Refresh(), RefreshTrack(), wxPanelWrapper::SetLabel(), wxPanelWrapper::SetName(), Observer::Publisher< Message, NotifyAll >::Subscribe(), UpdatePrefs(), and XO().

Here is the call graph for this function:

◆ ~TrackPanel()

TrackPanel::~TrackPanel ( )
virtual

Definition at line 345 of file TrackPanel.cpp.

346{
347 mTimer.Stop();
348
349 // This can happen if a label is being edited and the user presses
350 // ALT+F4 or Command+Q
351 if (HasCapture())
352 ReleaseMouse();
353}

References mTimer.

Member Function Documentation

◆ Destroy()

void TrackPanel::Destroy ( AudacityProject project)
static

Definition at line 242 of file TrackPanel.cpp.

243{
244 auto *pPanel = GetAttachedWindows(project).Find<TrackPanel>( sKey );
245 if (pPanel) {
246 pPanel->wxWindow::Destroy();
248 }
249}
AUDACITY_DLL_API AttachedWindows & GetAttachedWindows(AudacityProject &project)
Subclass * Find(const RegisteredFactory &key)
Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand...
Definition: ClientData.h:333
void Assign(const RegisteredFactory &key, ReplacementPointer &&replacement)
Reassign Site's pointer to ClientData.
Definition: ClientData.h:355
The TrackPanel class coordinates updates and operations on the main part of the screen which contains...
Definition: TrackPanel.h:66
AttachedWindows::RegisteredFactory sKey
Definition: TrackPanel.cpp:208

References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Assign(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Find(), GetAttachedWindows(), project, and anonymous_namespace{TrackPanel.cpp}::sKey.

Referenced by ProjectManager::OnCloseWindow().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DrawTracks()

void TrackPanel::DrawTracks ( wxDC *  dc)
protected

Draw the actual track areas. We only draw the borders and the little buttons and menues and whatnot here, the actual contents of each track are drawn by the TrackArtist.

Definition at line 820 of file TrackPanel.cpp.

821{
822 wxRegion region = GetUpdateRegion();
823
824 const wxRect clip = GetRect();
825
827 mTrackArtist->pSelectedRegion = &sr;
828 mTrackArtist->pZoomInfo = mViewInfo;
830 *dc, Target(), mLastMouseState, mTrackArtist.get()
831 };
832
833 // Don't draw a bottom margin here.
834
835 const auto &settings = ProjectSettings::Get( *GetProject() );
836 bool bMultiToolDown =
837 (ToolCodes::multiTool == settings.GetTool());
838 bool envelopeFlag =
839 bMultiToolDown || (ToolCodes::envelopeTool == settings.GetTool());
840 bool bigPointsFlag =
841 bMultiToolDown || (ToolCodes::drawTool == settings.GetTool());
842 bool sliderFlag = bMultiToolDown;
843 bool brushFlag = false;
844#ifdef EXPERIMENTAL_BRUSH_TOOL
845 brushFlag = (ToolCodes::brushTool == settings.GetTool());
846#endif
847
848 const bool hasSolo = GetTracks()->Any<PlayableTrack>()
849 .any_of( [](const PlayableTrack *pt) {
850 pt = static_cast<const PlayableTrack *>(
852 return (pt && pt->GetSolo());
853 } );
854
855 mTrackArtist->drawEnvelope = envelopeFlag;
856 mTrackArtist->bigPoints = bigPointsFlag;
857 mTrackArtist->drawSliders = sliderFlag;
858 mTrackArtist->onBrushTool = brushFlag;
859 mTrackArtist->hasSolo = hasSolo;
860
862}
static Settings & settings()
Definition: TrackInfo.cpp:83
void Draw(TrackPanelDrawingContext &context, unsigned nPasses)
UIHandlePtr Target()
ViewInfo * mViewInfo
wxMouseState mLastMouseState
AudioTrack subclass that can also be audibly replayed by the program.
Definition: PlayableTrack.h:40
bool GetSolo() const
Definition: PlayableTrack.h:48
static ProjectSettings & Get(AudacityProject &project)
Defines a selected portion of a project.
std::shared_ptr< Track > SubstitutePendingChangedTrack()
Definition: Track.cpp:1181
auto Any() -> TrackIterRange< TrackType >
Definition: Track.h:1091
const TrackList * GetTracks() const
Definition: TrackPanel.h:172
NotifyingSelectedRegion selectedRegion
Definition: ViewInfo.h:219

References TrackList::Any(), CellularPanel::Draw(), ToolCodes::drawTool, ToolCodes::envelopeTool, ProjectSettings::Get(), GetProject(), PlayableTrack::GetSolo(), GetTracks(), CellularPanel::mLastMouseState, mTrackArtist, ToolCodes::multiTool, CellularPanel::mViewInfo, TrackArtist::NPasses, ViewInfo::selectedRegion, settings(), Track::SubstitutePendingChangedTrack(), and CellularPanel::Target().

Referenced by OnPaint().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindFocusedTrackRect()

wxRect TrackPanel::FindFocusedTrackRect ( const Track target)
Returns
includes what's in FindTrackRect(target) and the focus ring area around it. If target is nullptr, returns empty rectangle.

Definition at line 1694 of file TrackPanel.cpp.

1695{
1696 auto rect = FindTrackRect(target);
1697 if (rect != wxRect{}) {
1698 // Enlarge horizontally.
1699 // PRL: perhaps it's one pixel too much each side, including some gray
1700 // beyond the yellow?
1701 rect.x = 0;
1702 GetClientSize(&rect.width, nullptr);
1703
1704 // Enlarge vertically, enough to enclose the yellow focus border pixels
1705 // The the outermost ring of gray pixels is included on three sides
1706 // but not the top (should that be fixed?)
1707
1708 // (Note that TrackPanel paints its focus over the "top margin" of the
1709 // rectangle allotted to the track, according to ChannelView::GetY() and
1710 // ChannelView::GetHeight(), but also over the margin of the next track.)
1711
1712 rect.height += kBottomMargin;
1713 int dy = kTopMargin - 1;
1714 rect.Inflate( 0, dy );
1715
1716 // Note that this rectangle does not coincide with any one of
1717 // the nodes in the subdivision.
1718 }
1719 return rect;
1720}
@ kBottomMargin
@ kTopMargin
wxRect FindTrackRect(const Track *target)

References FindTrackRect(), kBottomMargin, and kTopMargin.

Referenced by ScreenshotCommand::GetTrackRect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ FindRulerRects()

std::vector< wxRect > TrackPanel::FindRulerRects ( const Channel target)
Returns
extents of the vertical rulers of one channel, top to bottom. (There may be multiple sub-views, each with a ruler.) If target is nullptr, returns an empty vector.

Definition at line 1722 of file TrackPanel.cpp.

1723{
1724 std::vector<wxRect> results;
1725 VisitCells( [&](const wxRect &rect, TrackPanelCell &visited) {
1726 if (auto pRuler = dynamic_cast<const ChannelVRulerControls*>(&visited))
1727 if (auto pView = pRuler->GetChannelView())
1728 if (pView->FindChannel().get() == &target)
1729 results.push_back(rect);
1730 } );
1731 return results;
1732}
void VisitCells(const SimpleCellVisitor &visitor)

References CellularPanel::VisitCells().

Here is the call graph for this function:

◆ FindTrackRect()

wxRect TrackPanel::FindTrackRect ( const Track target)
Returns
includes track control panel, and the vertical ruler, and the proper track area of all channels, and the separators between them. If target is nullptr, returns empty rectangle.

Definition at line 1680 of file TrackPanel.cpp.

1681{
1682 auto leader = *GetTracks()->Find( target );
1683 if (!leader) {
1684 return {};
1685 }
1686
1687 return CellularPanel::FindRect( [&] ( TrackPanelNode &node ) {
1688 if (auto pGroup = dynamic_cast<const LabeledChannelGroup*>( &node ))
1689 return pGroup->mpTrack.get() == leader;
1690 return false;
1691 } );
1692}
wxRect FindRect(const TrackPanelCell &cell)
TrackIter< Track > Find(Track *pTrack)
Definition: Track.cpp:536
The TrackPanel is built up of nodes, subtrees of the CellularPanel's area Common base class for Track...

References TrackList::Find(), CellularPanel::FindRect(), and GetTracks().

Referenced by FindFocusedTrackRect().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Get() [1/2]

TrackPanel & TrackPanel::Get ( AudacityProject project)
static

Definition at line 232 of file TrackPanel.cpp.

233{
235}
Subclass & Get(const RegisteredFactory &key)
Get reference to an attachment, creating on demand if not present, down-cast it to Subclass.
Definition: ClientData.h:309

References ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Get(), GetAttachedWindows(), project, and anonymous_namespace{TrackPanel.cpp}::sKey.

Referenced by ScreenshotCommand::Apply(), SelectTimeCommand::Apply(), SetTrackVisualsCommand::ApplyInner(), ProjectSelectionManager::AS_ModifySelection(), BrushHandle::Click(), SelectHandle::Click(), WaveformPrefs::Commit(), MenuButtonHandle::CommitChanges(), LabelTrackView::DialogForLabelName(), anonymous_namespace{LabelMenus.cpp}::DoAddLabel(), EffectUI::DoEffect(), anonymous_namespace{TrackMenus.cpp}::DoMixAndRender(), anonymous_namespace{EditMenus.cpp}::DoPasteText(), TrackUtilities::DoRemoveTracks(), BrushHandle::Drag(), EditCursorOverlay::Draw(), DeviceToolBar::EnableDisableButtons(), GetInfoCommand::ExploreTrackPanel(), Get(), MixerTrackCluster::HandleSliderGain(), MixerTrackCluster::HandleSliderPan(), GainSliderHandle::HitTest(), PanSliderHandle::HitTest(), InitProjectWindow(), anonymous_namespace{SelectMenus.cpp}::MoveWhenAudioInactive(), anonymous_namespace{NavigationMenus.cpp}::NextOrPrevFrame(), MixerTrackCluster::OnButton_Mute(), anonymous_namespace{EditMenus.cpp}::OnCopy(), anonymous_namespace{EditMenus.cpp}::OnCut(), anonymous_namespace{WaveTrackAffordanceControls.cpp}::OnEditClipName(), anonymous_namespace{ToolsToolBar.cpp}::OnNextTool(), anonymous_namespace{LabelMenus.cpp}::OnPasteNewLabel(), anonymous_namespace{TransportMenus.cpp}::OnPlayOneSecond(), anonymous_namespace{TransportMenus.cpp}::OnPlayToSelection(), anonymous_namespace{ToolsToolBar.cpp}::OnPrevTool(), anonymous_namespace{Printing.cpp}::OnPrint(), anonymous_namespace{EditMenus.cpp}::OnRedo(), SelectActions::Handler::OnSelectAll(), ViewActions::Handler::OnShowClipping(), ViewActions::Handler::OnShowNameOverlay(), anonymous_namespace{TrackMenus.cpp}::OnSyncLock(), SelectHandle::TimerHandler::OnTimer(), anonymous_namespace{TrackMenus.cpp}::OnTrackClose(), anonymous_namespace{TrackMenus.cpp}::OnTrackGain(), anonymous_namespace{TrackMenus.cpp}::OnTrackGainDec(), anonymous_namespace{TrackMenus.cpp}::OnTrackGainInc(), anonymous_namespace{TrackMenus.cpp}::OnTrackMenu(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveBottom(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveDown(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveTop(), anonymous_namespace{TrackMenus.cpp}::OnTrackMoveUp(), anonymous_namespace{TrackMenus.cpp}::OnTrackPan(), anonymous_namespace{TrackMenus.cpp}::OnTrackPanLeft(), anonymous_namespace{TrackMenus.cpp}::OnTrackPanRight(), anonymous_namespace{EditMenus.cpp}::OnUndo(), ViewActions::Handler::OnZoomIn(), ViewActions::Handler::OnZoomNormal(), ViewActions::Handler::OnZoomToggle(), ProjectFileManager::OpenProjectFile(), SpectrumPrefs::Preview(), SpectrumPrefs::Rollback(), SelectUtilities::SelectNone(), anonymous_namespace{ToolsToolBar.cpp}::SetTool(), anonymous_namespace{TrackMenus.cpp}::SetTrackGain(), anonymous_namespace{TrackMenus.cpp}::SetTrackPan(), ProjectSelectionManager::SnapSelection(), and ProjectSelectionManager::SSBL_ModifySpectralSelection().

Here is the call graph for this function:

◆ Get() [2/2]

const TrackPanel & TrackPanel::Get ( const AudacityProject project)
static

Definition at line 237 of file TrackPanel.cpp.

238{
239 return Get( const_cast< AudacityProject & >( project ) );
240}
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
static TrackPanel & Get(AudacityProject &project)
Definition: TrackPanel.cpp:232

References Get(), and project.

Here is the call graph for this function:

◆ GetBackgroundCell()

std::shared_ptr< CommonTrackPanelCell > TrackPanel::GetBackgroundCell ( )

Definition at line 870 of file TrackPanel.cpp.

871{
872 return mpBackground;
873}
std::shared_ptr< CommonTrackPanelCell > mpBackground
Definition: TrackPanel.h:235

References mpBackground.

Referenced by GetFocusedCell().

Here is the caller graph for this function:

◆ GetFocusedCell()

TrackPanelCell * TrackPanel::GetFocusedCell ( )
overridevirtual

Implements CellularPanel.

Definition at line 1734 of file TrackPanel.cpp.

1735{
1736 // Note that focus track is always a leader
1737 auto pTrack = TrackFocus::Get(*GetProject()).Get();
1738 return pTrack
1739 ? &ChannelView::Get(*pTrack->GetChannel(0))
1740 : GetBackgroundCell().get();
1741}
static ChannelView & Get(Channel &channel)
std::shared_ptr< CommonTrackPanelCell > GetBackgroundCell()
Definition: TrackPanel.cpp:870

References TrackFocus::Get(), ChannelView::Get(), ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >::Get(), GetBackgroundCell(), and GetProject().

Referenced by OnTrackFocusChange().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetListener()

TrackPanelListener * TrackPanel::GetListener ( )
inline

Definition at line 175 of file TrackPanel.h.

175{ return mListener;}

◆ GetMostRecentXPos()

double TrackPanel::GetMostRecentXPos ( )

Definition at line 741 of file TrackPanel.cpp.

742{
745}
wxCoord MostRecentXCoord() const
double PositionToTime(int64 position, int64 origin=0, bool ignoreFisheye=false) const
Definition: ZoomInfo.cpp:35
int GetLeftOffset() const
Definition: ZoomInfo.h:93

References ZoomInfo::GetLeftOffset(), CellularPanel::MostRecentXCoord(), CellularPanel::mViewInfo, and ZoomInfo::PositionToTime().

Here is the call graph for this function:

◆ GetProject()

AudacityProject * TrackPanel::GetProject ( ) const
overridevirtual

Gets the pointer to the AudacityProject that goes with this track panel.

Implements CellularPanel.

Definition at line 366 of file TrackPanel.cpp.

367{
368 auto window = GetParent();
369
370 while(window != nullptr)
371 {
372 if(const auto projectWindow = dynamic_cast<ProjectWindow*>(window))
373 return projectWindow->FindProject().get();
374
375 window = window->GetParent();
376 }
377 return nullptr;
378}
A top-level window associated with a project, and handling scrollbars and zooming.
Definition: ProjectWindow.h:41

Referenced by DrawTracks(), GetFocusedCell(), IsAudioActive(), OnEnsureVisible(), OnIdle(), OnMouseEvent(), OnTimer(), OnTrackListDeletion(), OnUndoReset(), ProcessUIHandleResult(), Refresh(), SetFocusedCell(), TrackPanel(), UpdateStatusMessage(), and UpdateViewIfNoTracks().

Here is the caller graph for this function:

◆ GetRuler()

AdornedRulerPanel * TrackPanel::GetRuler ( )
inline

Definition at line 176 of file TrackPanel.h.

176{ return mRuler;}

Referenced by ScreenshotCommand::Apply(), and ScreenshotCommand::GetPanelRect().

Here is the caller graph for this function:

◆ GetSelectedTrackCount()

size_t TrackPanel::GetSelectedTrackCount ( ) const

Definition at line 635 of file TrackPanel.cpp.

636{
637 return GetTracks()->Selected().size();
638}
auto Selected() -> TrackIterRange< TrackType >
Definition: Track.h:1108

References GetTracks(), and TrackList::Selected().

Here is the call graph for this function:

◆ GetTracks() [1/2]

TrackList * TrackPanel::GetTracks ( )
inline

Definition at line 173 of file TrackPanel.h.

173{ return mTracks.get(); }

◆ GetTracks() [2/2]

const TrackList * TrackPanel::GetTracks ( ) const
inline

Definition at line 172 of file TrackPanel.h.

172{ return mTracks.get(); }

Referenced by DrawTracks(), FindTrackRect(), GetSelectedTrackCount(), OnEnsureVisible(), ProcessUIHandleResult(), RefreshTrack(), UpdateVRulers(), UpdateVRulerSize(), and VerticalScroll().

Here is the caller graph for this function:

◆ GetViewInfo()

ViewInfo * TrackPanel::GetViewInfo ( )
inline

Definition at line 174 of file TrackPanel.h.

174{ return mViewInfo;}

References CellularPanel::mViewInfo.

◆ HandlePageDownKey()

void TrackPanel::HandlePageDownKey ( )

Definition at line 604 of file TrackPanel.cpp.

605{
607}
virtual void TP_ScrollWindow(double scrollto)=0
double GetScreenEndTime() const
Definition: ZoomInfo.h:104

References ZoomInfo::GetScreenEndTime(), mListener, CellularPanel::mViewInfo, and TrackPanelListener::TP_ScrollWindow().

Referenced by OnKeyDown().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HandlePageUpKey()

void TrackPanel::HandlePageUpKey ( )

Definition at line 599 of file TrackPanel.cpp.

References ZoomInfo::GetScreenEndTime(), ZoomInfo::h, mListener, CellularPanel::mViewInfo, and TrackPanelListener::TP_ScrollWindow().

Referenced by OnKeyDown().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ IsAudioActive()

bool TrackPanel::IsAudioActive ( )
protected

Definition at line 609 of file TrackPanel.cpp.

610{
612 return ProjectAudioIO::Get( *p ).IsAudioActive();
613}
bool IsAudioActive() const
static ProjectAudioIO & Get(AudacityProject &project)

References ProjectAudioIO::Get(), GetProject(), and ProjectAudioIO::IsAudioActive().

Referenced by OnTimer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ MakeParentRedrawScrollbars()

void TrackPanel::MakeParentRedrawScrollbars ( )

Definition at line 519 of file TrackPanel.cpp.

520{
522}
virtual void TP_RedrawScrollbars()=0

References mListener, and TrackPanelListener::TP_RedrawScrollbars().

Here is the call graph for this function:

◆ OnAudioIO()

void TrackPanel::OnAudioIO ( AudioIOEvent  evt)

Definition at line 807 of file TrackPanel.cpp.

808{
809 if (evt.type == AudioIOEvent::MONITOR)
810 return;
811 // Some hit tests want to change their cursor to and from the ban symbol
813}
void HandleCursorForPresentMouseState(bool doHit=true)
void CallAfter(Action action)
Schedule an action to be done later, and in the main thread.
Definition: BasicUI.cpp:208
enum AudioIOEvent::Type type

References BasicUI::CallAfter(), CellularPanel::HandleCursorForPresentMouseState(), AudioIOEvent::MONITOR, and AudioIOEvent::type.

Referenced by TrackPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnEnsureVisible()

void TrackPanel::OnEnsureVisible ( const TrackListEvent event)

Definition at line 1010 of file TrackPanel.cpp.

1011{
1012 bool modifyState = e.mExtra;
1013 auto pTrack = e.mpTrack.lock();
1014 auto t = pTrack.get();
1015 // Promised by TrackListEvent for this event type:
1016 assert(!t || t->IsLeader());
1017 int trackTop = 0;
1018 int trackHeight =0;
1019 for (auto it : *GetTracks()) {
1020 trackTop += trackHeight;
1021 trackHeight = ChannelView::GetChannelGroupHeight(it);
1022
1023 if (it == t) {
1024 //We have found the track we want to ensure is visible.
1025
1026 //Get the size of the trackpanel.
1027 int width, height;
1028 GetSize(&width, &height);
1029
1030 if (trackTop < mViewInfo->vpos) {
1031 height = mViewInfo->vpos - trackTop + mViewInfo->scrollStep;
1032 height /= mViewInfo->scrollStep;
1033 mListener->TP_ScrollUpDown(-height);
1034 }
1035 else if (trackTop + trackHeight > mViewInfo->vpos + height) {
1036 height = (trackTop + trackHeight) - (mViewInfo->vpos + height);
1037 height = (height + mViewInfo->scrollStep + 1) / mViewInfo->scrollStep;
1038 mListener->TP_ScrollUpDown(height);
1039 }
1040
1041 break;
1042 }
1043 }
1044 Refresh(false);
1045
1046 if (modifyState)
1048}
static int GetChannelGroupHeight(const Track *pTrack)
Definition: ChannelView.cpp:32
void ModifyState(bool bWantsAutoSave)
static ProjectHistory & Get(AudacityProject &project)
virtual bool TP_ScrollUpDown(int delta)=0
int scrollStep
Definition: ViewInfo.h:237
int vpos
Definition: ZoomInfo.h:50

References ProjectHistory::Get(), ChannelView::GetChannelGroupHeight(), GetProject(), GetTracks(), TrackListEvent::mExtra, mListener, ProjectHistory::ModifyState(), TrackListEvent::mpTrack, CellularPanel::mViewInfo, Refresh(), ViewInfo::scrollStep, TrackPanelListener::TP_ScrollUpDown(), and ZoomInfo::vpos.

Here is the call graph for this function:

◆ OnIdle()

void TrackPanel::OnIdle ( wxIdleEvent &  event)

Definition at line 388 of file TrackPanel.cpp.

389{
390 event.Skip();
391 // The window must be ready when the timer fires (#1401)
392 if (IsShownOnScreen())
393 {
394 mTimer.Start(std::chrono::milliseconds{kTimerInterval}.count(), FALSE);
395
396 // Timer is started, we don't need the event anymore
397 GetProjectFrame( *GetProject() ).Unbind(wxEVT_IDLE,
398 &TrackPanel::OnIdle, this);
399 }
400 else
401 {
402 // Get another idle event, wx only guarantees we get one
403 // event after "some other normal events occur"
404 event.RequestMore();
405 }
406}
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
constexpr auto kTimerInterval

References GetProject(), GetProjectFrame(), kTimerInterval, mTimer, and OnIdle().

Referenced by OnIdle(), and TrackPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnKeyDown()

void TrackPanel::OnKeyDown ( wxKeyEvent &  event)

Definition at line 692 of file TrackPanel.cpp.

693{
694 switch (event.GetKeyCode())
695 {
696 // Allow PageUp and PageDown keys to
697 //scroll the Track Panel left and right
698 case WXK_PAGEUP:
700 return;
701
702 case WXK_PAGEDOWN:
704 return;
705
706 default:
707 // fall through to base class handler
708 event.Skip();
709 }
710}
void HandlePageUpKey()
Definition: TrackPanel.cpp:599
void HandlePageDownKey()
Definition: TrackPanel.cpp:604

References HandlePageDownKey(), and HandlePageUpKey().

Here is the call graph for this function:

◆ OnMouseEvent()

void TrackPanel::OnMouseEvent ( wxMouseEvent &  event)

Definition at line 712 of file TrackPanel.cpp.

713{
714 if (event.LeftDown()) {
715 // wxTimers seem to be a little unreliable, so this
716 // "primes" it to make sure it keeps going for a while...
717
718 // When this timer fires, we call TrackPanel::OnTimer and
719 // possibly update the screen for offscreen scrolling.
720 mTimer.Stop();
721 mTimer.Start(std::chrono::milliseconds{kTimerInterval}.count(), FALSE);
722 }
723
724
725 if (event.ButtonUp()) {
726 //EnsureVisible should be called after processing the up-click.
727 this->CallAfter( [this, event]{
728 const auto foundCell = FindCell(event.m_x, event.m_y);
729 const auto t = FindTrack( foundCell.pCell.get() );
730 if ( t ) {
731 TrackFocus::Get(*GetProject()).Set(t.get());
732 t->EnsureVisible();
733 }
734 } );
735 }
736
737 // Must also fall through to base class handler
738 event.Skip();
739}
FoundCell FindCell(int mouseX, int mouseY)
void EnsureVisible(bool modifyState=false)
Definition: Track.cpp:86
std::shared_ptr< Track > FindTrack(TrackPanelCell *pCell)
Definition: TrackPanel.cpp:525

References BasicUI::CallAfter(), Track::EnsureVisible(), CellularPanel::FindCell(), anonymous_namespace{TrackPanel.cpp}::FindTrack(), TrackFocus::Get(), GetProject(), kTimerInterval, and mTimer.

Here is the call graph for this function:

◆ OnPaint()

void TrackPanel::OnPaint ( wxPaintEvent &  event)

AS: OnPaint( ) is called during the normal course of completing a repaint operation.

Definition at line 476 of file TrackPanel.cpp.

477{
479
480 auto sw =
482
483 {
484 wxPaintDC dc(this);
485
486 // Retrieve the damage rectangle
487 wxRect box = GetUpdateRegion().GetBox();
488
489 // Recreate the backing bitmap if we have a full refresh
490 // (See TrackPanel::Refresh())
491 if (mRefreshBacking || (box == GetRect()))
492 {
493 // Reset (should a mutex be used???)
494 mRefreshBacking = false;
495
496 // Redraw the backing bitmap
498
499 // Copy it to the display
500 DisplayBitmap(dc);
501 }
502 else
503 {
504 // Copy full, possibly clipped, damage rectangle
505 RepairBitmap(dc, box.x, box.y, box.width, box.height);
506 }
507
508 // Done with the clipped DC
509
510 // Drawing now goes directly to the client area.
511 // DrawOverlays() may need to draw outside the clipped region.
512 // (Used to make a NEW, separate wxClientDC, but that risks flashing
513 // problems on Mac.)
514 dc.DestroyClippingRegion();
515 DrawOverlays(true, &dc);
516 }
517}
wxDC & GetBackingDCForRepaint()
Definition: BackedPanel.cpp:35
void DisplayBitmap(wxDC &dc)
Definition: BackedPanel.cpp:65
void RepairBitmap(wxDC &dc, wxCoord x, wxCoord y, wxCoord width, wxCoord height)
Definition: BackedPanel.cpp:60
@ TrackPanel
Full repaint time of the TrackPanel.
static Stopwatch CreateStopwatch(SectionID section) noexcept
Create a Stopwatch for the section specified.
void DrawOverlays(bool repaint_all, wxDC *pDC=nullptr)
SelectedRegion mLastDrawnSelectedRegion
Definition: TrackPanel.h:231
void DrawTracks(wxDC *dc)
Definition: TrackPanel.cpp:820

References FrameStatistics::CreateStopwatch(), BackedPanel::DisplayBitmap(), OverlayPanel::DrawOverlays(), DrawTracks(), BackedPanel::GetBackingDCForRepaint(), mLastDrawnSelectedRegion, mRefreshBacking, CellularPanel::mViewInfo, BackedPanel::RepairBitmap(), ViewInfo::selectedRegion, and FrameStatistics::TrackPanel.

Here is the call graph for this function:

◆ OnSize()

void TrackPanel::OnSize ( wxSizeEvent &  evt)

Definition at line 380 of file TrackPanel.cpp.

381{
382 evt.Skip();
383 const auto &size = evt.GetSize();
384 mViewInfo->SetWidth( size.GetWidth() );
385 mViewInfo->SetHeight( size.GetHeight() );
386}
void SetHeight(int height)
Definition: ViewInfo.h:202
void SetWidth(int width)
Definition: ZoomInfo.h:86

References CellularPanel::mViewInfo, ViewInfo::SetHeight(), ZoomInfo::SetWidth(), and size.

Here is the call graph for this function:

◆ OnSyncLockChange()

void TrackPanel::OnSyncLockChange ( struct SyncLockChangeMessage  )

Definition at line 461 of file TrackPanel.cpp.

462{
463 Refresh(false);
464}

References Refresh().

Referenced by TrackPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnTimer()

void TrackPanel::OnTimer ( wxTimerEvent &  event)

AS: This gets called on our wx timer events.

Definition at line 409 of file TrackPanel.cpp.

410{
411 mTimeCount++;
412
413 AudacityProject *const p = GetProject();
414 auto &window = ProjectWindow::Get( *p );
415
416 auto &projectAudioIO = ProjectAudioIO::Get( *p );
417 auto gAudioIO = AudioIO::Get();
418
419 // Check whether we were playing or recording, but the stream has stopped.
420 if (projectAudioIO.GetAudioIOToken()>0 && !IsAudioActive())
421 {
422 //the stream may have been started up after this one finished (by some other project)
423 //in that case reset the buttons don't stop the stream
424 auto &projectAudioManager = ProjectAudioManager::Get( *p );
425 projectAudioManager.Stop(!gAudioIO->IsStreamActive());
426 }
427
428 // Next, check to see if we were playing or recording
429 // audio, but now Audio I/O is completely finished.
430 if (projectAudioIO.GetAudioIOToken()>0 &&
431 !gAudioIO->IsAudioTokenActive(projectAudioIO.GetAudioIOToken()))
432 {
433 projectAudioIO.SetAudioIOToken(0);
434 window.RedrawProject();
435 }
438 }
439
440 // Notify listeners for timer ticks
441 window.GetPlaybackScroller().OnTimer();
442
443 DrawOverlays(false);
444 mRuler->DrawOverlays(false);
445
446 if(IsAudioActive() && gAudioIO->GetNumCaptureChannels()) {
447
448 // Periodically update the display while recording
449
450 if ((mTimeCount % 5) == 0) {
451 // Must tell OnPaint() to recreate the backing bitmap
452 // since we've not done a full refresh.
453 mRefreshBacking = true;
454 Refresh( false );
455 }
456 }
457 if(mTimeCount > 1000)
458 mTimeCount = 0;
459}
static ProjectAudioManager & Get(AudacityProject &project)
void UpdateSelectionDisplay()
Definition: TrackPanel.cpp:624
bool IsAudioActive()
Definition: TrackPanel.cpp:609

References OverlayPanel::DrawOverlays(), AudioIO::Get(), ProjectAudioIO::Get(), ProjectAudioManager::Get(), ProjectWindow::Get(), GetProject(), IsAudioActive(), mLastDrawnSelectedRegion, mRefreshBacking, mRuler, mTimeCount, CellularPanel::mViewInfo, Refresh(), ViewInfo::selectedRegion, and UpdateSelectionDisplay().

Here is the call graph for this function:

◆ OnTrackFocusChange()

void TrackPanel::OnTrackFocusChange ( struct TrackFocusChangeMessage  )

Definition at line 1751 of file TrackPanel.cpp.

1752{
1753 if (auto cell = GetFocusedCell())
1754 Refresh( false );
1755}
TrackPanelCell * GetFocusedCell() override

References GetFocusedCell(), and Refresh().

Referenced by TrackPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OnTrackListDeletion()

void TrackPanel::OnTrackListDeletion ( )

Definition at line 677 of file TrackPanel.cpp.

678{
679 // copy shared_ptr for safety, as in HandleClick
680 auto handle = Target();
681 if (handle) {
682 handle->OnProjectChange(GetProject());
683 }
684
685 // If the focused track disappeared but there are still other tracks,
686 // this reassigns focus.
687 TrackFocus( *GetProject() ).Get();
688
690}
static TrackFocus & Get(AudacityProject &project)
void UpdateVRulerSize()
Definition: TrackPanel.cpp:981

References TrackFocus::Get(), GetProject(), CellularPanel::Target(), and UpdateVRulerSize().

Here is the call graph for this function:

◆ OnTrackListResizing()

void TrackPanel::OnTrackListResizing ( const TrackListEvent event)

Definition at line 664 of file TrackPanel.cpp.

665{
666 auto t = e.mpTrack.lock();
667 // A deleted track can trigger the event. In which case do nothing here.
668 // A deleted track can have a valid pointer but no owner, bug 2060
669 if( t && t->HasOwner() )
670 UpdateVRuler(t.get());
671
672 // fix for bug 2477
674}
void UpdateVRuler(Track *t)
Definition: TrackPanel.cpp:933

References mListener, TrackListEvent::mpTrack, TrackPanelListener::TP_RedrawScrollbars(), and UpdateVRuler().

Here is the call graph for this function:

◆ OnTrackMenu()

void TrackPanel::OnTrackMenu ( Track t = NULL)

Definition at line 1003 of file TrackPanel.cpp.

1004{
1006 t ? &ChannelView::Get(*t->GetChannel(0)) : nullptr);
1007}
void DoContextMenu(TrackPanelCell *pCell=nullptr)
std::shared_ptr< ChannelType > GetChannel(size_t iChannel)
Retrieve a channel, cast to the given type.
Definition: Channel.h:344

References CellularPanel::DoContextMenu(), ChannelView::Get(), and ChannelGroup::GetChannel().

Here is the call graph for this function:

◆ OnUndoReset()

void TrackPanel::OnUndoReset ( struct UndoRedoMessage  message)

Definition at line 466 of file TrackPanel.cpp.

467{
468 if (message.type == UndoRedoMessage::Reset) {
469 TrackFocus::Get( *GetProject() ).Set( nullptr );
470 Refresh( false );
471 }
472}
enum UndoRedoMessage::Type type

References TrackFocus::Get(), GetProject(), Refresh(), UndoRedoMessage::Reset, and UndoRedoMessage::type.

Referenced by TrackPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ ProcessUIHandleResult()

void TrackPanel::ProcessUIHandleResult ( TrackPanelCell pClickedTrack,
TrackPanelCell pLatestCell,
unsigned  refreshResult 
)
overrideprotectedvirtual

Implements CellularPanel.

Definition at line 533 of file TrackPanel.cpp.

536{
537 const auto panel = this;
538 auto pLatestTrack = FindTrack( pLatestCell ).get();
539
540 // This precaution checks that the track is not only nonnull, but also
541 // really owned by the track list
542 auto pClickedTrack = GetTracks()->Lock(
543 std::weak_ptr<Track>{ FindTrack( pClickedCell ) }
544 ).get();
545
546 // TODO: make a finer distinction between refreshing the track control area,
547 // and the waveform area. As it is, redraw both whenever you must redraw either.
548
549 // Copy data from the underlying tracks to the pending tracks that are
550 // really displayed
551 TrackList::Get( *panel->GetProject() ).UpdatePendingTracks();
552
553 using namespace RefreshCode;
554
555 if (refreshResult & DestroyedCell) {
556 panel->UpdateViewIfNoTracks();
557 // Beware stale pointer!
558 if (pLatestTrack == pClickedTrack)
559 pLatestTrack = NULL;
560 pClickedTrack = NULL;
561 }
562
563 if (pClickedTrack && (refreshResult & RefreshCode::UpdateVRuler))
564 panel->UpdateVRuler(pClickedTrack);
565
566 if (refreshResult & RefreshCode::DrawOverlays) {
567 panel->DrawOverlays(false);
568 mRuler->DrawOverlays(false);
569 }
570
571 // Refresh all if told to do so, or if told to refresh a track that
572 // is not known.
573 const bool refreshAll =
574 ( (refreshResult & RefreshAll)
575 || ((refreshResult & RefreshCell) && !pClickedTrack)
576 || ((refreshResult & RefreshLatestCell) && !pLatestTrack));
577
578 if (refreshAll)
579 panel->Refresh(false);
580 else {
581 if (refreshResult & RefreshCell)
582 panel->RefreshTrack(pClickedTrack);
583 if (refreshResult & RefreshLatestCell)
584 panel->RefreshTrack(pLatestTrack);
585 }
586
587 if (refreshResult & FixScrollbars)
588 panel->MakeParentRedrawScrollbars();
589
590 if (refreshResult & Resize)
591 panel->GetListener()->TP_HandleResize();
592
593 if ((refreshResult & RefreshCode::EnsureVisible) && pClickedTrack) {
594 TrackFocus::Get(*GetProject()).Set(pClickedTrack);
595 pClickedTrack->EnsureVisible();
596 }
597}
std::shared_ptr< Subclass > Lock(const std::weak_ptr< Subclass > &wTrack)
Definition: Track.h:1240
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:354
void UpdatePendingTracks()
Definition: Track.cpp:1047
Namespace containing an enum 'what to do on a refresh?'.
Definition: RefreshCode.h:16
@ RefreshLatestCell
Definition: RefreshCode.h:25

References RefreshCode::DestroyedCell, RefreshCode::DrawOverlays, OverlayPanel::DrawOverlays(), Track::EnsureVisible(), RefreshCode::EnsureVisible, anonymous_namespace{TrackPanel.cpp}::FindTrack(), RefreshCode::FixScrollbars, TrackFocus::Get(), TrackList::Get(), GetProject(), GetTracks(), TrackList::Lock(), mRuler, RefreshCode::RefreshAll, RefreshCode::RefreshCell, RefreshCode::RefreshLatestCell, RefreshCode::Resize, TrackList::UpdatePendingTracks(), and RefreshCode::UpdateVRuler.

Here is the call graph for this function:

◆ Refresh()

void TrackPanel::Refresh ( bool  eraseBackground = true,
const wxRect *  rect = (const wxRect *) NULL 
)
override

This method overrides Refresh() of wxWindow so that the boolean play indicator can be set to false, so that an old play indicator that is no longer there won't get XORed (to erase it), thus redrawing it on the TrackPanel

Definition at line 784 of file TrackPanel.cpp.

786{
787 // Tell OnPaint() to refresh the backing bitmap.
788 //
789 // Originally I had the check within the OnPaint() routine and it
790 // was working fine. That was until I found that, even though a full
791 // refresh was requested, Windows only set the onscreen portion of a
792 // window as damaged.
793 //
794 // So, if any part of the trackpanel was off the screen, full refreshes
795 // didn't work and the display got corrupted.
796 if( !rect || ( *rect == GetRect() ) )
797 {
798 mRefreshBacking = true;
799 }
800 wxWindow::Refresh(eraseBackground, rect);
801
802 CallAfter([this]{
803 if (GetProject())
805}

References BasicUI::CallAfter(), GetProject(), CellularPanel::HandleCursorForPresentMouseState(), and mRefreshBacking.

Referenced by OnEnsureVisible(), OnSyncLockChange(), SelectHandle::TimerHandler::OnTimer(), OnTimer(), OnTrackFocusChange(), OnUndoReset(), RefreshTrack(), anonymous_namespace{ToolsToolBar.cpp}::SetTool(), ProjectSelectionManager::SnapSelection(), TrackPanel(), UpdatePrefs(), UpdateSelectionDisplay(), UpdateVRulerSize(), and VerticalScroll().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ RefreshTrack()

void TrackPanel::RefreshTrack ( Track trk,
bool  refreshbacking = true 
)

Definition at line 747 of file TrackPanel.cpp.

748{
749 if (!trk)
750 return;
751
752 // Always move to the first channel of the group, and use only
753 // the sum of channel heights, not the height of any channel alone!
754 trk = *GetTracks()->Find(trk);
755 auto height = ChannelView::GetChannelGroupHeight(trk);
756
757 // Set rectangle top according to the scrolling position, `vpos`
758 // Subtract the inset (above) and shadow (below) from the height of the
759 // rectangle, but not the border
760 // This matters because some separators do paint over the border
761 auto &view = ChannelView::Get(*trk->GetChannel(0));
762 const auto top =
763 -mViewInfo->vpos + view.GetCumulativeHeightBefore() + kTopInset;
764 height -= (kTopInset + kShadowThickness);
765
766 // Width also subtracts insets (left and right) plus shadow (right)
767 const auto left = kLeftInset;
768 const auto width = GetRect().GetWidth()
770
771 wxRect rect(left, top, width, height);
772
773 if( refreshbacking )
774 mRefreshBacking = true;
775
776 Refresh( false, &rect );
777}
@ kTopInset
@ kRightInset
Definition: ZoomInfo.h:26
@ kShadowThickness
Definition: ZoomInfo.h:23
@ kLeftInset
Definition: ZoomInfo.h:25

References TrackList::Find(), ChannelView::Get(), ChannelGroup::GetChannel(), ChannelView::GetChannelGroupHeight(), GetTracks(), kLeftInset, kRightInset, kShadowThickness, kTopInset, mRefreshBacking, CellularPanel::mViewInfo, Refresh(), and ZoomInfo::vpos.

Referenced by MixerTrackCluster::HandleSliderGain(), MixerTrackCluster::HandleSliderPan(), MixerTrackCluster::OnButton_Mute(), anonymous_namespace{WaveTrackAffordanceControls.cpp}::OnEditClipName(), anonymous_namespace{TrackMenus.cpp}::SetTrackGain(), anonymous_namespace{TrackMenus.cpp}::SetTrackPan(), and TrackPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Root()

std::shared_ptr< TrackPanelNode > TrackPanel::Root ( )
overrideprotectedvirtual

Implements CellularPanel.

Definition at line 1668 of file TrackPanel.cpp.

1669{
1670 // Root and other subgroup objects are throwaways.
1671 // They might instead be cached to avoid repeated allocation.
1672 // That cache would need invalidation when there is addition, deletion, or
1673 // permutation of tracks, or change of width of the vertical rulers.
1674 return std::make_shared< MainGroup >( *this );
1675}

◆ SetBackgroundCell()

void TrackPanel::SetBackgroundCell ( const std::shared_ptr< CommonTrackPanelCell > &  pCell)

Definition at line 864 of file TrackPanel.cpp.

866{
867 mpBackground = pCell;
868}

References mpBackground.

◆ SetFocusedCell()

void TrackPanel::SetFocusedCell ( )
overridevirtual

Implements CellularPanel.

Definition at line 1743 of file TrackPanel.cpp.

1744{
1745 // This may have a side-effect of assigning a focus if there was none
1746 auto& trackFocus = TrackFocus::Get(*GetProject());
1747 trackFocus.Set(trackFocus.Get());
1749}
void Capture(wxWindow *handler)

References KeyboardCapture::Capture(), TrackFocus::Get(), and GetProject().

Here is the call graph for this function:

◆ UpdatePrefs()

void TrackPanel::UpdatePrefs ( )
overridevirtual

Implements PrefsListener.

Definition at line 355 of file TrackPanel.cpp.

356{
357 // All vertical rulers must be recalculated since the minimum and maximum
358 // frequencies may have been changed.
360
361 Refresh();
362}
void UpdateVRulers()
Definition: TrackPanel.cpp:925

References Refresh(), and UpdateVRulers().

Referenced by TrackPanel().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateSelectionDisplay()

void TrackPanel::UpdateSelectionDisplay ( )
protected

Definition at line 624 of file TrackPanel.cpp.

625{
626 // Full refresh since the label area may need to indicate
627 // newly selected tracks.
628 Refresh(false);
629
630 // Make sure the ruler follows suit.
632}

References AdornedRulerPanel::DrawSelection(), mRuler, and Refresh().

Referenced by OnTimer().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateStatusMessage()

void TrackPanel::UpdateStatusMessage ( const TranslatableString status)
overrideprotectedvirtual

Implements CellularPanel.

Definition at line 615 of file TrackPanel.cpp.

616{
617 auto status = st;
618 if (HasEscape())
619 /* i18n-hint Esc is a key on the keyboard */
620 status.Join( XO("(Esc to cancel)"), " " );
621 ProjectStatus::Get( *GetProject() ).Set( status );
622}
static ProjectStatus & Get(AudacityProject &project)
void Set(const TranslatableString &msg, StatusBarField field=mainStatusBarField)
TranslatableString & Join(TranslatableString arg, const wxString &separator={}) &
Append another translatable string.

References ProjectStatus::Get(), GetProject(), CellularPanel::HasEscape(), TranslatableString::Join(), ProjectStatus::Set(), and XO().

Here is the call graph for this function:

◆ UpdateTrackVRuler()

void TrackPanel::UpdateTrackVRuler ( Track t)
Precondition
t.IsLeader()

Definition at line 941 of file TrackPanel.cpp.

942{
943 assert(t.IsLeader());
944
945 auto heights = FindAdjustedChannelHeights(t);
946
947 wxRect rect(mViewInfo->GetVRulerOffset(),
948 0,
950 0);
951
952 auto pHeight = heights.begin();
953 for (auto pChannel : t.Channels()) {
954 auto &view = ChannelView::Get(*pChannel);
955 const auto height = *pHeight++;
956 rect.SetHeight(height);
957 const auto subViews = view.GetSubViews(rect);
958 if (subViews.empty())
959 continue;
960
961 auto iter = subViews.begin(), end = subViews.end(), next = iter;
962 auto yy = iter->first;
963 wxSize vRulerSize{ 0, 0 };
964 auto &size = view.vrulerSize;
965 for (; iter != end; iter = next) {
966 ++next;
967 auto nextY = (next == end)
968 ? height
969 : next->first;
970 rect.SetHeight(nextY - yy);
971 // This causes ruler size in the track to be reassigned:
972 ChannelVRulerControls::Get(*iter->second).UpdateRuler(rect);
973 // But we want to know the maximum width and height over all sub-views:
974 vRulerSize.IncTo({ size.first, size.second });
975 yy = nextY;
976 }
977 size = { vRulerSize.x, vRulerSize.y };
978 }
979}
IteratorRange< ChannelIterator< ChannelType > > Channels()
Get range of channels with mutative access.
Definition: Channel.h:408
static ChannelVRulerControls & Get(ChannelView &)
virtual void UpdateRuler(const wxRect &rect)=0
bool IsLeader() const override
Definition: Track.cpp:298
int GetVRulerOffset() const
Definition: ZoomInfo.h:90
int GetVRulerWidth() const
Definition: ZoomInfo.h:88
auto end(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:159
std::vector< int > FindAdjustedChannelHeights(Track &t)
Definition: TrackPanel.cpp:879

References ChannelGroup::Channels(), PackedArray::end(), anonymous_namespace{TrackPanel.cpp}::FindAdjustedChannelHeights(), ChannelView::Get(), ChannelVRulerControls::Get(), ZoomInfo::GetVRulerOffset(), ZoomInfo::GetVRulerWidth(), Track::IsLeader(), CellularPanel::mViewInfo, size, and ChannelVRulerControls::UpdateRuler().

Referenced by UpdateVRuler(), and UpdateVRulers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateViewIfNoTracks()

void TrackPanel::UpdateViewIfNoTracks ( )

Definition at line 640 of file TrackPanel.cpp.

641{
642 if (mTracks->empty())
643 {
644 // BG: There are no more tracks on screen
645 //BG: Set zoom to normal
647
648 //STM: Set selection to 0,0
649 //PRL: and default the rest of the selection information
651
652 // PRL: Following causes the time ruler to align 0 with left edge.
653 // Bug 972
654 mViewInfo->h = 0;
655
657 //STM: Clear message if all tracks are removed
659 }
660}
virtual void TP_HandleResize()=0
static double GetDefaultZoom()
Definition: ZoomInfo.h:113
void SetZoom(double pixelsPerSecond)
Definition: ZoomInfo.cpp:89

References ProjectStatus::Get(), ZoomInfo::GetDefaultZoom(), GetProject(), ZoomInfo::h, mListener, mTracks, CellularPanel::mViewInfo, ViewInfo::selectedRegion, ProjectStatus::Set(), ZoomInfo::SetZoom(), and TrackPanelListener::TP_HandleResize().

Here is the call graph for this function:

◆ UpdateVRuler()

void TrackPanel::UpdateVRuler ( Track t)

Definition at line 933 of file TrackPanel.cpp.

934{
935 if (t)
937
939}
static auto Channels(TrackType *pTrack) -> TrackIterRange< TrackType >
Definition: Track.h:1158
void UpdateTrackVRuler(Track &t)
Definition: TrackPanel.cpp:941
auto begin(const Ptr< Type, BaseDeleter > &p)
Enables range-for.
Definition: PackedArray.h:150

References PackedArray::begin(), TrackList::Channels(), UpdateTrackVRuler(), and UpdateVRulerSize().

Referenced by OnTrackListResizing().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateVRulers()

void TrackPanel::UpdateVRulers ( )

Definition at line 925 of file TrackPanel.cpp.

926{
927 for (auto t : GetTracks()->Any<WaveTrack>())
929
931}

References GetTracks(), UpdateTrackVRuler(), and UpdateVRulerSize().

Referenced by UpdatePrefs().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UpdateVRulerSize()

void TrackPanel::UpdateVRulerSize ( )

Definition at line 981 of file TrackPanel.cpp.

982{
983 auto trackRange = GetTracks()->Any();
984 if (trackRange) {
985 wxSize s{ 0, 0 };
986 // Find maximum width over all channels
987 for (auto t : trackRange)
988 for (auto pChannel : t->Channels()) {
989 auto &size = ChannelView::Get(*pChannel).vrulerSize;
990 s.IncTo({ size.first, size.second });
991 }
992
993 if (mViewInfo->GetVRulerWidth() != s.GetWidth()) {
994 mViewInfo->SetVRulerWidth(s.GetWidth());
996 mViewInfo->GetLeftOffset()); // bevel on AdornedRuler
997 mRuler->Refresh();
998 }
999 }
1000 Refresh(false);
1001}
void Refresh(bool eraseBackground=true, const wxRect *rect=(const wxRect *) NULL) override
void SetLeftOffset(int offset)
std::pair< int, int > vrulerSize
Definition: ChannelView.h:128
void SetVRulerWidth(int width)
Definition: ZoomInfo.h:89

References TrackList::Any(), ChannelView::Get(), ZoomInfo::GetLeftOffset(), GetTracks(), ZoomInfo::GetVRulerWidth(), mRuler, CellularPanel::mViewInfo, AdornedRulerPanel::Refresh(), Refresh(), AdornedRulerPanel::SetLeftOffset(), ZoomInfo::SetVRulerWidth(), size, and ChannelView::vrulerSize.

Referenced by OnTrackListDeletion(), UpdateVRuler(), and UpdateVRulers().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ VerticalScroll()

void TrackPanel::VerticalScroll ( float  fracPosition)

Definition at line 1052 of file TrackPanel.cpp.

1052 {
1053
1054 int trackTop = 0;
1055 int trackHeight = 0;
1056
1057 auto tracks = GetTracks();
1058
1059 auto range = tracks->Any();
1060 if (!range.empty()) {
1061 trackHeight = ChannelView::GetChannelGroupHeight(*range.rbegin());
1062 --range.second;
1063 }
1064 trackTop = range.sum(ChannelView::GetChannelGroupHeight);
1065
1066 int delta;
1067
1068 //Get the size of the trackpanel.
1069 int width, height;
1070 GetSize(&width, &height);
1071
1072 delta = (fracPosition * (trackTop + trackHeight - height)) - mViewInfo->vpos + mViewInfo->scrollStep;
1073 //wxLogDebug( "Scroll down by %i pixels", delta );
1074 delta /= mViewInfo->scrollStep;
1075 mListener->TP_ScrollUpDown(delta);
1076 Refresh(false);
1077}

References ChannelView::GetChannelGroupHeight(), GetTracks(), mListener, CellularPanel::mViewInfo, Refresh(), ViewInfo::scrollStep, TrackPanelListener::TP_ScrollUpDown(), tracks, and ZoomInfo::vpos.

Here is the call graph for this function:

Member Data Documentation

◆ mAudioIOSubscription

Observer::Subscription TrackPanel::mAudioIOSubscription
protected

Definition at line 192 of file TrackPanel.h.

Referenced by TrackPanel().

◆ mFocusChangeSubscription

Observer::Subscription TrackPanel::mFocusChangeSubscription
protected

Definition at line 194 of file TrackPanel.h.

Referenced by TrackPanel().

◆ mLastDrawnSelectedRegion

SelectedRegion TrackPanel::mLastDrawnSelectedRegion {}
protected

Definition at line 231 of file TrackPanel.h.

Referenced by OnPaint(), and OnTimer().

◆ mListener

TrackPanelListener* TrackPanel::mListener
protected

◆ mpBackground

std::shared_ptr<CommonTrackPanelCell> TrackPanel::mpBackground
protected

Definition at line 235 of file TrackPanel.h.

Referenced by GetBackgroundCell(), and SetBackgroundCell().

◆ mProjectRulerInvalidatedSubscription

Observer::Subscription TrackPanel::mProjectRulerInvalidatedSubscription
protected

Definition at line 197 of file TrackPanel.h.

Referenced by TrackPanel().

◆ mRealtimeEffectManagerSubscription

Observer::Subscription TrackPanel::mRealtimeEffectManagerSubscription
protected

Definition at line 195 of file TrackPanel.h.

Referenced by TrackPanel().

◆ mRefreshBacking

bool TrackPanel::mRefreshBacking
protected

Definition at line 226 of file TrackPanel.h.

Referenced by OnPaint(), OnTimer(), Refresh(), and RefreshTrack().

◆ mRuler

AdornedRulerPanel* TrackPanel::mRuler
protected

◆ mSyncLockSubscription

Observer::Subscription TrackPanel::mSyncLockSubscription
protected

Definition at line 196 of file TrackPanel.h.

Referenced by TrackPanel().

◆ mTimeCount

int TrackPanel::mTimeCount
protected

Definition at line 224 of file TrackPanel.h.

Referenced by OnTimer(), and TrackPanel().

◆ mTimer

TrackPanel::AudacityTimer TrackPanel::mTimer
protected

◆ mTrackArtist

std::unique_ptr<TrackArtist> TrackPanel::mTrackArtist
protected

Definition at line 206 of file TrackPanel.h.

Referenced by DrawTracks(), and TrackPanel().

◆ mTrackListSubscription

Observer::Subscription TrackPanel::mTrackListSubscription
protected

Definition at line 191 of file TrackPanel.h.

Referenced by TrackPanel().

◆ mTracks

std::shared_ptr<TrackList> TrackPanel::mTracks
protected

Definition at line 202 of file TrackPanel.h.

Referenced by TrackPanel(), and UpdateViewIfNoTracks().

◆ mUndoSubscription

Observer::Subscription TrackPanel::mUndoSubscription
protected

Definition at line 193 of file TrackPanel.h.

Referenced by TrackPanel().


The documentation for this class was generated from the following files: