Audacity 3.2.0
|
#include <CutlineHandle.h>
Public Member Functions | |
CutlineHandle (const std::shared_ptr< WaveTrack > &pTrack, WaveTrackLocations locations, WaveTrackLocation location) | |
CutlineHandle & | operator= (const CutlineHandle &)=default |
virtual | ~CutlineHandle () |
std::shared_ptr< const Track > | FindTrack () const override |
const WaveTrackLocation & | GetLocation () |
std::shared_ptr< WaveTrack > | GetTrack () |
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 |
bool | StopsOnKeystroke () 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 | HitAnywhere (const AudacityProject *pProject, bool cutline, UIHandlePtr ptr) |
static UIHandlePtr | HitTest (std::weak_ptr< CutlineHandle > &holder, const wxMouseState &state, const wxRect &rect, const AudacityProject *pProject, std::shared_ptr< WaveTrack > pTrack) |
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 Types | |
enum | Operation { Expand , Remove } |
Private Member Functions | |
CutlineHandle (const CutlineHandle &)=delete | |
Static Private Member Functions | |
static HitTestPreview | HitPreview (bool unsafe) |
Private Attributes | |
std::shared_ptr< WaveTrack > | mpTrack {} |
Operation | mOperation { Expand } |
double | mStartTime {} |
double | mEndTime {} |
WaveTrackLocations | mLocations |
WaveTrackLocation | mLocation {} |
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 21 of file CutlineHandle.h.
|
private |
|
privatedelete |
|
explicit |
Definition at line 29 of file CutlineHandle.cpp.
|
virtual |
Definition at line 104 of file CutlineHandle.cpp.
|
overridevirtual |
Implements UIHandle.
Definition at line 203 of file CutlineHandle.cpp.
References Expand, ProjectHistory::Get(), ViewInfo::Get(), mEndTime, mOperation, mStartTime, project, RefreshCode::RefreshCell, ProjectHistory::RollbackState(), ViewInfo::selectedRegion, and NotifyingSelectedRegion::setTimes().
|
overridevirtual |
Someone has just clicked the mouse. What do we do?
Implements UIHandle.
Definition at line 118 of file CutlineHandle.cpp.
References Cancelled, TrackPanelMouseEvent::event, Expand, WaveTrackUtilities::ExpandCutLine(), ProjectAudioIO::Get(), ViewInfo::Get(), ProjectAudioIO::IsAudioActive(), mEndTime, mLocation, mOperation, mpTrack, mStartTime, WaveTrackLocation::pos, RefreshCode::RefreshCell, RefreshCode::RefreshNone, Remove, and WaveTrackUtilities::RemoveCutLine().
|
overridevirtual |
Implements UIHandle.
Definition at line 167 of file CutlineHandle.cpp.
References RefreshCode::RefreshNone.
|
overridevirtual |
Reimplemented from UIHandle.
Definition at line 39 of file CutlineHandle.cpp.
References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.
|
overridevirtual |
Implements UIHandle.
Definition at line 108 of file CutlineHandle.cpp.
References mpTrack.
|
inline |
|
inline |
Definition at line 45 of file CutlineHandle.h.
References mpTrack.
Referenced by WaveChannelSubView::DrawBoldBoundaries().
|
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 113 of file CutlineHandle.cpp.
|
static |
|
staticprivate |
Definition at line 46 of file CutlineHandle.cpp.
References MakeCursor(), and XO().
Referenced by Preview().
|
static |
method that tells us if the mouse event landed on an editable Cutline
Definition at line 83 of file CutlineHandle.cpp.
References AssignUIHandlePtr(), FindWaveTrackLocations(), ViewInfo::Get(), and anonymous_namespace{CutlineHandle.cpp}::IsOverCutline().
Referenced by WaveChannelSubView::DoDetailedHitTest().
|
default |
|
overridevirtual |
Implements UIHandle.
Definition at line 173 of file CutlineHandle.cpp.
References ProjectAudioIO::Get(), HitPreview(), and ProjectAudioIO::IsAudioActive().
|
overridevirtual |
Implements UIHandle.
Definition at line 180 of file CutlineHandle.cpp.
References Expand, ProjectHistory::Get(), mOperation, ProjectHistory::PushState(), RefreshCode::RefreshNone, Remove, and XO().
|
inlineoverridevirtual |
|
private |
Definition at line 73 of file CutlineHandle.h.
|
private |
Definition at line 75 of file CutlineHandle.h.
Referenced by Click(), and GetLocation().
|
private |
Definition at line 74 of file CutlineHandle.h.
Definition at line 72 of file CutlineHandle.h.
|
private |
Definition at line 70 of file CutlineHandle.h.
Referenced by Click(), FindTrack(), and GetTrack().
|
private |
Definition at line 73 of file CutlineHandle.h.