11#ifndef __AUDACITY_LABEL_GLYPH_HANDLE__
12#define __AUDACITY_LABEL_GLYPH_HANDLE__
45 std::shared_ptr<LabelTrack>
mpLT {};
55 (
const std::shared_ptr<LabelTrack> &pLT,
56 const wxRect &rect,
const std::shared_ptr<LabelTrackHit> &pHit);
61 (std::weak_ptr<LabelGlyphHandle> &holder,
62 const wxMouseState &state,
63 const std::shared_ptr<LabelTrack> &pLT,
const wxRect &rect);
67 std::shared_ptr<const Track>
FindTrack()
const override;
83 wxWindow *pParent)
override;
89 std::shared_ptr<LabelTrackHit>
mpHit{};
97 const wxMouseEvent & evt,
const wxRect & r,
const ZoomInfo &zoomInfo,
102 const wxMouseEvent & evt, wxRect & r,
const ZoomInfo &zoomInfo,
107 int iLabel,
int iEdge,
bool bAllowSwapping,
double fNewTime);
108 void MayMoveLabel(
int iLabel,
int iEdge,
double fNewTime);
110 std::shared_ptr<LabelTrack>
mpLT {};
std::shared_ptr< UIHandle > UIHandlePtr
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Result Cancel(AudacityProject *pProject) override
void Enter(bool forward, AudacityProject *) override
std::shared_ptr< LabelTrackHit > mpHit
Result Click(const TrackPanelMouseEvent &event, AudacityProject *pProject) override
bool StopsOnKeystroke() override
void MayAdjustLabel(LabelTrackHit &hit, int iLabel, int iEdge, bool bAllowSwapping, double fNewTime)
bool HandleGlyphDragRelease(AudacityProject &project, LabelTrackHit &hit, const wxMouseEvent &evt, wxRect &r, const ZoomInfo &zoomInfo, NotifyingSelectedRegion &newSel)
Result Drag(const TrackPanelMouseEvent &event, AudacityProject *pProject) override
Result Release(const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override
std::shared_ptr< LabelTrack > mpLT
static UIHandlePtr HitTest(std::weak_ptr< LabelGlyphHandle > &holder, const wxMouseState &state, const std::shared_ptr< LabelTrack > &pLT, const wxRect &rect)
virtual ~LabelGlyphHandle()
static UIHandle::Result NeedChangeHighlight(const LabelGlyphHandle &oldState, const LabelGlyphHandle &newState)
void MayMoveLabel(int iLabel, int iEdge, double fNewTime)
void HandleGlyphClick(LabelTrackHit &hit, const wxMouseEvent &evt, const wxRect &r, const ZoomInfo &zoomInfo, NotifyingSelectedRegion &newSel)
LabelGlyphHandle(const std::shared_ptr< LabelTrack > &pLT, const wxRect &rect, const std::shared_ptr< LabelTrackHit > &pHit)
LabelGlyphHandle & operator=(const LabelGlyphHandle &)=default
HitTestPreview Preview(const TrackPanelMouseState &state, AudacityProject *pProject) override
int mxMouseDisplacement
Displacement of mouse cursor from the centre being dragged.
std::shared_ptr< const Track > FindTrack() const override
A LabelTrack is a Track that holds labels (LabelStruct).
A move-only handle representing a connection to a Publisher.
int mMouseOverLabelRight
Keeps track of which left label the mouse is currently over.
LabelTrackHit(const std::shared_ptr< LabelTrack > &pLT)
int mMouseOverLabelLeft
Keeps track of which (ranged) label the mouse is currently over.
std::shared_ptr< LabelTrack > mpLT
void OnLabelPermuted(const LabelTrackEvent &e)
Observer::Subscription mSubscription
bool mIsAdjustingLabel
Keeps track of which right label the mouse is currently over.