From f8e5bb9128b8cbc49eef983d633c365a60f86077 Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Sun, 8 Aug 2021 10:57:27 -0400 Subject: [PATCH] Publicize that all cells in TrackPanel inherit CommonTrackPanelCell --- src/TrackPanel.cpp | 5 +++-- src/TrackPanel.h | 9 ++++++--- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/TrackPanel.cpp b/src/TrackPanel.cpp index a39d9267f..b0157ebd7 100644 --- a/src/TrackPanel.cpp +++ b/src/TrackPanel.cpp @@ -51,6 +51,7 @@ is time to refresh some aspect of the screen. #include // for wxUSE_* macros #include "AdornedRulerPanel.h" +#include "tracks/ui/CommonTrackPanelCell.h" #include "KeyboardCapture.h" #include "Project.h" #include "ProjectAudioIO.h" @@ -860,12 +861,12 @@ void TrackPanel::DrawTracks(wxDC * dc) } void TrackPanel::SetBackgroundCell -(const std::shared_ptr< TrackPanelCell > &pCell) +(const std::shared_ptr< CommonTrackPanelCell > &pCell) { mpBackground = pCell; } -std::shared_ptr< TrackPanelCell > TrackPanel::GetBackgroundCell() +std::shared_ptr< CommonTrackPanelCell > TrackPanel::GetBackgroundCell() { return mpBackground; } diff --git a/src/TrackPanel.h b/src/TrackPanel.h index 6023fa4c1..c42f1de17 100644 --- a/src/TrackPanel.h +++ b/src/TrackPanel.h @@ -31,6 +31,9 @@ class wxRect; +// All cells of the TrackPanel are subclasses of this +class CommonTrackPanelCell; + class SpectrumAnalyst; class Track; class TrackList; @@ -177,8 +180,8 @@ public: // Set the object that performs catch-all event handling when the pointer // is not in any track or ruler or control panel. void SetBackgroundCell - (const std::shared_ptr< TrackPanelCell > &pCell); - std::shared_ptr< TrackPanelCell > GetBackgroundCell(); + (const std::shared_ptr< CommonTrackPanelCell > &pCell); + std::shared_ptr< CommonTrackPanelCell > GetBackgroundCell(); public: @@ -218,7 +221,7 @@ protected: protected: - std::shared_ptr mpBackground; + std::shared_ptr mpBackground; DECLARE_EVENT_TABLE()