1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-01 16:19:43 +02:00

Define LabelTrackView::Get(), LabelTrackView::FindLabelTrack()

This commit is contained in:
Paul Licameli 2019-06-18 11:22:07 -04:00
parent c8b62f5d8a
commit 9d26eb7a41
2 changed files with 28 additions and 0 deletions

View File

@ -24,6 +24,26 @@ LabelTrackView::~LabelTrackView()
{
}
LabelTrackView &LabelTrackView::Get( LabelTrack &track )
{
return static_cast< LabelTrackView& >( TrackView::Get( track ) );
}
const LabelTrackView &LabelTrackView::Get( const LabelTrack &track )
{
return static_cast< const LabelTrackView& >( TrackView::Get( track ) );
}
std::shared_ptr<LabelTrack> LabelTrackView::FindLabelTrack()
{
return std::static_pointer_cast<LabelTrack>( FindTrack() );
}
std::shared_ptr<const LabelTrack> LabelTrackView::FindLabelTrack() const
{
return const_cast<LabelTrackView*>(this)->FindLabelTrack();
}
std::vector<UIHandlePtr> LabelTrack::DetailedHitTest
(const TrackPanelMouseState &st,
const AudacityProject *WXUNUSED(pProject), int, bool)

View File

@ -13,6 +13,8 @@ Paul Licameli split from class LabelTrack
#include "../../ui/CommonTrackView.h"
class LabelTrack;
class LabelTrackView final : public CommonTrackView
{
LabelTrackView( const LabelTrackView& ) = delete;
@ -24,8 +26,14 @@ public:
: CommonTrackView{ pTrack } {}
~LabelTrackView() override;
static LabelTrackView &Get( LabelTrack& );
static const LabelTrackView &Get( const LabelTrack& );
private:
std::shared_ptr<TrackVRulerControls> DoGetVRulerControls() override;
std::shared_ptr<LabelTrack> FindLabelTrack();
std::shared_ptr<const LabelTrack> FindLabelTrack() const;
};
#endif