1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-06-21 23:00:06 +02:00

Define CellularPanel::Root

This commit is contained in:
Paul Licameli 2018-09-17 12:53:34 -04:00
parent 30d55f476e
commit 4fe97acbc9
5 changed files with 25 additions and 0 deletions

View File

@ -2102,6 +2102,11 @@ void AdornedRulerPanel::GetMaxSize(wxCoord *width, wxCoord *height)
}
// CellularPanel implementation
std::shared_ptr<TrackPanelNode> AdornedRulerPanel::Root()
{
return {};
}
auto AdornedRulerPanel::FindCell(int mouseX, int mouseY) -> FoundCell
{
bool mayScrub = mProject->GetScrubber().CanScrub() &&

View File

@ -172,6 +172,11 @@ private:
//
// CellularPanel implementation
//
// Get the root object defining a recursive subdivision of the panel's
// area into cells
std::shared_ptr<TrackPanelNode> Root() override;
FoundCell FindCell(int mouseX, int mouseY) override;
wxRect FindRect(const TrackPanelCell &cell) override;
public:

View File

@ -18,6 +18,7 @@ class ViewInfo;
class AudacityProject;
class TrackPanelCell;
class TrackPanelNode;
struct TrackPanelMouseEvent;
struct TrackPanelMouseState;
@ -47,6 +48,11 @@ public:
std::shared_ptr<TrackPanelCell> pCell;
wxRect rect;
};
// Get the root object defining a recursive subdivision of the panel's
// area into cells
virtual std::shared_ptr<TrackPanelNode> Root() = 0;
virtual FoundCell FindCell(int mouseX, int mouseY) = 0;
virtual wxRect FindRect(const TrackPanelCell &cell) = 0;
virtual TrackPanelCell *GetFocusedCell() = 0;

View File

@ -1956,6 +1956,11 @@ void TrackPanel::DrawShadow(const Track * /* t */ , wxDC * dc, const wxRect & re
AColor::Line(*dc, right, rect.y, right, rect.y + 1);
}
std::shared_ptr<TrackPanelNode> TrackPanel::Root()
{
return {};
}
/// Determines which cell is under the mouse
/// @param mouseX - mouse X position.
/// @param mouseY - mouse Y position.

View File

@ -337,6 +337,10 @@ protected:
void MakeParentModifyState(bool bWantsAutoSave); // if true, writes auto-save file. Should set only if you really want the state change restored after
// a crash, as it can take many seconds for large (eg. 10 track-hours) projects
// Get the root object defining a recursive subdivision of the panel's
// area into cells
std::shared_ptr<TrackPanelNode> Root() override;
// Find track info by coordinate
FoundCell FindCell(int mouseX, int mouseY) override;