1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-19 17:11:12 +02:00

Publicize that all cells in TrackPanel inherit CommonTrackPanelCell

This commit is contained in:
Paul Licameli
2021-08-08 10:57:27 -04:00
parent aa54bbd93a
commit f8e5bb9128
2 changed files with 9 additions and 5 deletions

View File

@@ -51,6 +51,7 @@ is time to refresh some aspect of the screen.
#include <wx/setup.h> // for wxUSE_* macros #include <wx/setup.h> // for wxUSE_* macros
#include "AdornedRulerPanel.h" #include "AdornedRulerPanel.h"
#include "tracks/ui/CommonTrackPanelCell.h"
#include "KeyboardCapture.h" #include "KeyboardCapture.h"
#include "Project.h" #include "Project.h"
#include "ProjectAudioIO.h" #include "ProjectAudioIO.h"
@@ -860,12 +861,12 @@ void TrackPanel::DrawTracks(wxDC * dc)
} }
void TrackPanel::SetBackgroundCell void TrackPanel::SetBackgroundCell
(const std::shared_ptr< TrackPanelCell > &pCell) (const std::shared_ptr< CommonTrackPanelCell > &pCell)
{ {
mpBackground = pCell; mpBackground = pCell;
} }
std::shared_ptr< TrackPanelCell > TrackPanel::GetBackgroundCell() std::shared_ptr< CommonTrackPanelCell > TrackPanel::GetBackgroundCell()
{ {
return mpBackground; return mpBackground;
} }

View File

@@ -31,6 +31,9 @@
class wxRect; class wxRect;
// All cells of the TrackPanel are subclasses of this
class CommonTrackPanelCell;
class SpectrumAnalyst; class SpectrumAnalyst;
class Track; class Track;
class TrackList; class TrackList;
@@ -177,8 +180,8 @@ public:
// Set the object that performs catch-all event handling when the pointer // Set the object that performs catch-all event handling when the pointer
// is not in any track or ruler or control panel. // is not in any track or ruler or control panel.
void SetBackgroundCell void SetBackgroundCell
(const std::shared_ptr< TrackPanelCell > &pCell); (const std::shared_ptr< CommonTrackPanelCell > &pCell);
std::shared_ptr< TrackPanelCell > GetBackgroundCell(); std::shared_ptr< CommonTrackPanelCell > GetBackgroundCell();
public: public:
@@ -218,7 +221,7 @@ protected:
protected: protected:
std::shared_ptr<TrackPanelCell> mpBackground; std::shared_ptr<CommonTrackPanelCell> mpBackground;
DECLARE_EVENT_TABLE() DECLARE_EVENT_TABLE()