Audacity 3.2.0
|
#include <LabelTextHandle.h>
Public Member Functions | |
LabelTextHandle & | operator= (const LabelTextHandle &)=default |
LabelTextHandle (const std::shared_ptr< LabelTrack > &pLT, int labelNum) | |
virtual | ~LabelTextHandle () |
std::shared_ptr< const Track > | FindTrack () const override |
int | GetLabelNum () const |
void | Enter (bool forward, AudacityProject *) override |
bool | HandlesRightClick () override |
Whether the handle has any special right-button handling. More... | |
Result | Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) override |
Result | Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) override |
HitTestPreview | Preview (const TrackPanelMouseState &state, AudacityProject *pProject) override |
Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override |
Result | Cancel (AudacityProject *pProject) override |
Public Member Functions inherited from LabelDefaultClickHandle | |
LabelDefaultClickHandle () | |
virtual | ~LabelDefaultClickHandle () |
LabelDefaultClickHandle & | operator= (const LabelDefaultClickHandle &)=default |
Result | Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) override |
Result | Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) override |
Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override |
Result | Cancel (AudacityProject *pProject) override |
Public Member Functions inherited from UIHandle | |
virtual | ~UIHandle ()=0 |
virtual void | Enter (bool forward, AudacityProject *pProject) |
virtual bool | HasRotation () const |
virtual bool | Rotate (bool forward) |
virtual bool | HasEscape (AudacityProject *pProject) const |
virtual bool | Escape (AudacityProject *pProject) |
virtual bool | HandlesRightClick () |
Whether the handle has any special right-button handling. More... | |
virtual Result | Click (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0 |
virtual Result | Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0 |
virtual HitTestPreview | Preview (const TrackPanelMouseState &state, AudacityProject *pProject)=0 |
virtual Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent)=0 |
virtual Result | Cancel (AudacityProject *pProject)=0 |
virtual bool | StopsOnKeystroke () |
virtual void | OnProjectChange (AudacityProject *pProject) |
virtual std::shared_ptr< const Track > | FindTrack () const =0 |
virtual bool | IsDragging () const |
Result | GetChangeHighlight () const |
void | SetChangeHighlight (Result val) |
Public Member Functions inherited from TrackPanelDrawable | |
virtual | ~TrackPanelDrawable ()=0 |
virtual void | Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) |
virtual wxRect | DrawingArea (TrackPanelDrawingContext &context, const wxRect &rect, const wxRect &panelRect, unsigned iPass) |
Static Public Member Functions | |
static UIHandlePtr | HitTest (std::weak_ptr< LabelTextHandle > &holder, const wxMouseState &state, const std::shared_ptr< LabelTrack > &pLT) |
Static Public Member Functions inherited from UIHandle | |
static UIHandle::Result | NeedChangeHighlight (const UIHandle &, const UIHandle &) |
static std::shared_ptr< const Track > | TrackFromChannel (const std::shared_ptr< const Channel > &pChannel) |
A frequent convenience in the definition of UIHandles. More... | |
Static Public Member Functions inherited from TrackPanelDrawable | |
static wxRect | MaximizeWidth (const wxRect &rect, const wxRect &panelRect) |
static wxRect | MaximizeHeight (const wxRect &rect, const wxRect &panelRect) |
Private Member Functions | |
void | HandleTextClick (AudacityProject &project, const wxMouseEvent &evt) |
void | HandleTextDragRelease (AudacityProject &project, const wxMouseEvent &evt) |
Static Private Member Functions | |
static HitTestPreview | HitPreview () |
Private Attributes | |
std::weak_ptr< LabelTrack > | mpLT {} |
int | mLabelNum { -1 } |
int | mLabelTrackStartXPos { -1 } |
int | mLabelTrackStartYPos { -1 } |
bool | mRightDragging { false } |
flag to tell if it's a valid dragging More... | |
Additional Inherited Members | |
Public Types inherited from UIHandle | |
using | Result = unsigned |
using | Cell = TrackPanelCell |
Protected Attributes inherited from UIHandle | |
Result | mChangeHighlight { 0 } |
Definition at line 22 of file LabelTextHandle.h.
|
explicit |
Definition at line 28 of file LabelTextHandle.cpp.
|
virtual |
Definition at line 69 of file LabelTextHandle.cpp.
|
overridevirtual |
Reimplemented from LabelDefaultClickHandle.
Definition at line 286 of file LabelTextHandle.cpp.
References LabelDefaultClickHandle::Cancel(), and RefreshCode::RefreshAll.
|
overridevirtual |
Reimplemented from LabelDefaultClickHandle.
Definition at line 154 of file LabelTextHandle.cpp.
References RefreshCode::Cancelled, LabelDefaultClickHandle::Click(), TrackPanelMouseEvent::event, ViewInfo::Get(), HandleTextClick(), mpLT, and RefreshCode::RefreshCell.
|
overridevirtual |
Reimplemented from LabelDefaultClickHandle.
Definition at line 224 of file LabelTextHandle.cpp.
References LabelDefaultClickHandle::Drag(), TrackPanelMouseEvent::event, TrackList::Get(), LabelTrackView::Get(), HandleTextDragRelease(), TrackList::Lock(), mLabelTrackStartXPos, mLabelTrackStartYPos, mpLT, LabelTrackView::OverTextBox(), project, and RefreshCode::RefreshCell.
|
overridevirtual |
Reimplemented from UIHandle.
Definition at line 35 of file LabelTextHandle.cpp.
References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.
|
overridevirtual |
Implements UIHandle.
Definition at line 73 of file LabelTextHandle.cpp.
References mpLT.
Referenced by LabelTrackView::Draw().
|
inline |
|
overridevirtual |
Whether the handle has any special right-button handling.
If not, then Click() will not be called for right click. Default is always false
Reimplemented from UIHandle.
Definition at line 149 of file LabelTextHandle.cpp.
|
private |
Definition at line 78 of file LabelTextHandle.cpp.
References LabelTrackView::Get(), mpLT, mRightDragging, LabelTrackView::OverATextBox(), LabelTrackView::OverTextBox(), and project.
Referenced by Click().
|
private |
Definition at line 171 of file LabelTextHandle.cpp.
References LabelTrackView::Get(), mpLT, mRightDragging, LabelTrackView::OverTextBox(), and project.
Referenced by Drag(), and Release().
|
staticprivate |
Definition at line 42 of file LabelTextHandle.cpp.
References MakeCursor(), and XO().
Referenced by Preview().
|
static |
Definition at line 52 of file LabelTextHandle.cpp.
References AssignUIHandlePtr(), and LabelTrackView::OverATextBox().
Referenced by LabelTrackView::DetailedHitTest().
|
default |
|
overridevirtual |
Implements UIHandle.
Definition at line 259 of file LabelTextHandle.cpp.
References HitPreview().
|
overridevirtual |
Reimplemented from LabelDefaultClickHandle.
Definition at line 265 of file LabelTextHandle.cpp.
References TrackPanelMouseEvent::event, TrackList::Get(), HandleTextDragRelease(), TrackList::Lock(), mLabelTrackStartXPos, mpLT, RefreshCode::RefreshNone, and LabelDefaultClickHandle::Release().
|
private |
Definition at line 67 of file LabelTextHandle.h.
Referenced by GetLabelNum().
|
private |
Definition at line 68 of file LabelTextHandle.h.
|
private |
Definition at line 69 of file LabelTextHandle.h.
Referenced by Drag().
|
private |
Definition at line 66 of file LabelTextHandle.h.
Referenced by Click(), Drag(), FindTrack(), HandleTextClick(), HandleTextDragRelease(), and Release().
|
private |
flag to tell if it's a valid dragging
Definition at line 72 of file LabelTextHandle.h.
Referenced by HandleTextClick(), and HandleTextDragRelease().