11#ifndef __AUDACITY_UI_HANDLE__
12#define __AUDACITY_UI_HANDLE__
55 virtual bool HasRotation()
const;
60 virtual bool Rotate(
bool forward);
74 virtual bool HandlesRightClick();
103 wxWindow *pParent) = 0;
113 virtual bool StopsOnKeystroke();
124 virtual std::shared_ptr<const Track>
FindTrack()
const = 0;
128 virtual bool IsDragging()
const;
145 static std::shared_ptr<const Track>
146 TrackFromChannel(
const std::shared_ptr<const Channel> &pChannel);
162template<
typename Sub
class>
164( std::weak_ptr<Subclass> &holder,
const std::shared_ptr<Subclass> &pNew )
170 auto ptr = holder.lock();
177 wxASSERT(
typeid(*ptr) ==
typeid(*pNew));
179 auto code = Subclass::NeedChangeHighlight( *ptr, *pNew );
180 *ptr = std::move(*pNew);
181 ptr->SetChangeHighlight( code );
std::shared_ptr< UIHandle > UIHandlePtr
std::shared_ptr< Subclass > AssignUIHandlePtr(std::weak_ptr< Subclass > &holder, const std::shared_ptr< Subclass > &pNew)
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Abstract base class for an object holding data associated with points on a time axis.
Drawing interface common to cells, groups of cells, and temporary handles in CellularPanel.
Short-lived drawing and event-handling object associated with a TrackPanelCell.
virtual Result Drag(const TrackPanelMouseEvent &event, AudacityProject *pProject)=0
virtual Result Release(const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent)=0
void SetChangeHighlight(Result val)
Result GetChangeHighlight() const
virtual std::shared_ptr< const Track > FindTrack() const =0
static UIHandle::Result NeedChangeHighlight(const UIHandle &, const UIHandle &)
virtual HitTestPreview Preview(const TrackPanelMouseState &state, AudacityProject *pProject)=0
virtual Result Cancel(AudacityProject *pProject)=0
virtual Result Click(const TrackPanelMouseEvent &event, AudacityProject *pProject)=0