11#ifndef __AUDACITY_COMMON_TRACK_PANEL_CELL__
12#define __AUDACITY_COMMON_TRACK_PANEL_CELL__
38 unsigned(const TrackPanelMouseEvent &evt, AudacityProject *pProject)
50 std::shared_ptr<Track>
FindTrack() {
return DoFindTrack(); }
59 Action action = {},
bool enabled = true )
60 : symbol{
internal, msgid }, action{ move(action) }, enabled{ enabled }
84 virtual std::vector<MenuItem> GetMenuItems(
85 const wxRect &rect,
const wxPoint *pPosition,
AudacityProject *pProject );
110 std::shared_ptr<Track> DoFindTrack()
override;
112 void Reparent(
const std::shared_ptr<Track> &parent)
override;
127 std::shared_ptr<Track> DoFindTrack()
override;
129 void Reparent(
const std::shared_ptr<Track> &parent,
size_t iChannel)
133 template<
typename Subtype = Channel>
135 -> std::shared_ptr<Subtype>
136 {
return std::dynamic_pointer_cast<Subtype>(DoFindChannel()); }
139 template<
typename Subtype = const Channel>
141 ->
std::enable_if_t<
std::is_const_v<Subtype>,
142 std::shared_ptr<Subtype>
144 {
return std::dynamic_pointer_cast<Subtype>(DoFindChannel()); }
147 std::shared_ptr<Channel> DoFindChannel();
148 std::shared_ptr<const Channel> DoFindChannel()
const;
Adapts TrackAttachment interface with extra channel index argument.
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
CommandContext provides additional information to an 'Apply()' command. It provides the project,...
auto FindChannel() const -> std::enable_if_t< std::is_const_v< Subtype >, std::shared_ptr< Subtype > >
May return null.
auto FindChannel() -> std::shared_ptr< Subtype >
May return null.
std::weak_ptr< Channel > mwChannel
std::weak_ptr< Track > mwTrack
std::shared_ptr< Track > FindTrack()
std::shared_ptr< const Track > FindTrack() const
virtual std::shared_ptr< Track > DoFindTrack()=0
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Global function-valued variable, adding a convenient Call()
An explicitly nonlocalized string, not meant for the user to see.
Abstract base class for an object holding data associated with points on a time axis.
virtual unsigned DoContextMenu(const wxRect &rect, wxWindow *pParent, const wxPoint *pPosition, AudacityProject *pProject)
virtual HitTestPreview DefaultPreview(const TrackPanelMouseState &state, const AudacityProject *pProject)
virtual unsigned HandleWheelRotation(const TrackPanelMouseEvent &event, AudacityProject *pProject)
Holds a msgid for the translation catalog; may also bind format arguments.
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...