![]() |
Audacity 3.2.0
|
#include <CutlineHandle.h>
Public Member Functions | |
CutlineHandle (const std::shared_ptr< WaveTrack > &pTrack, WaveTrackLocation location) | |
CutlineHandle & | operator= (const CutlineHandle &)=default |
virtual | ~CutlineHandle () |
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 |
![]() | |
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) |
Result | GetChangeHighlight () const |
void | SetChangeHighlight (Result val) |
![]() | |
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, const std::shared_ptr< WaveTrack > &pTrack) |
![]() | |
static UIHandle::Result | NeedChangeHighlight (const UIHandle &, const UIHandle &) |
![]() | |
static wxRect | MaximizeWidth (const wxRect &rect, const wxRect &panelRect) |
static wxRect | MaximizeHeight (const wxRect &rect, const wxRect &panelRect) |
Private Types | |
enum | Operation { Merge , Expand , Remove } |
Private Member Functions | |
CutlineHandle (const CutlineHandle &)=delete | |
Static Private Member Functions | |
static HitTestPreview | HitPreview (bool cutline, bool unsafe) |
Private Attributes | |
std::shared_ptr< WaveTrack > | mpTrack {} |
Operation | mOperation { Merge } |
double | mStartTime {} |
double | mEndTime {} |
WaveTrackLocation | mLocation {} |
Additional Inherited Members | |
![]() | |
using | Result = unsigned |
using | Cell = TrackPanelCell |
![]() | |
Result | mChangeHighlight { 0 } |
Definition at line 21 of file CutlineHandle.h.
|
private |
|
privatedelete |
|
explicit |
Definition at line 25 of file CutlineHandle.cpp.
|
virtual |
Definition at line 115 of file CutlineHandle.cpp.
|
overridevirtual |
Implements UIHandle.
Definition at line 246 of file CutlineHandle.cpp.
References Expand, ProjectHistory::Get(), ViewInfo::Get(), mEndTime, mOperation, mStartTime, 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 124 of file CutlineHandle.cpp.
References RefreshCode::Cancelled, TrackList::Channels(), TrackPanelMouseEvent::event, Expand, anonymous_namespace{CutlineHandle.cpp}::FindMergeLine(), WaveTrackLocations::Get(), ProjectAudioIO::Get(), ViewInfo::Get(), ProjectAudioIO::IsAudioActive(), WaveTrackLocation::locationCutLine, WaveTrackLocation::locationMergePoint, mEndTime, Merge, mLocation, mOperation, mpTrack, mStartTime, WaveTrackLocation::pos, RefreshCode::RefreshCell, RefreshCode::RefreshNone, Remove, and WaveTrackLocation::typ.
|
overridevirtual |
Implements UIHandle.
Definition at line 205 of file CutlineHandle.cpp.
References RefreshCode::RefreshNone.
|
overridevirtual |
Reimplemented from UIHandle.
Definition at line 32 of file CutlineHandle.cpp.
References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.
|
inline |
|
inline |
Definition at line 44 of file CutlineHandle.h.
References mpTrack.
Referenced by WaveTrackSubView::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 119 of file CutlineHandle.cpp.
|
static |
|
staticprivate |
Definition at line 39 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 96 of file CutlineHandle.cpp.
References AssignUIHandlePtr(), ViewInfo::Get(), and anonymous_namespace{CutlineHandle.cpp}::IsOverCutline().
Referenced by WaveTrackSubView::DoDetailedHitTest().
|
default |
|
overridevirtual |
Implements UIHandle.
Definition at line 211 of file CutlineHandle.cpp.
References ProjectAudioIO::Get(), HitPreview(), ProjectAudioIO::IsAudioActive(), WaveTrackLocation::locationCutLine, mLocation, and WaveTrackLocation::typ.
|
overridevirtual |
Implements UIHandle.
Definition at line 219 of file CutlineHandle.cpp.
References CONSOLIDATE, Expand, ProjectHistory::Get(), Merge, mOperation, ProjectHistory::PushState(), RefreshCode::RefreshNone, Remove, and XO().
|
inlineoverridevirtual |
|
private |
Definition at line 72 of file CutlineHandle.h.
|
private |
Definition at line 73 of file CutlineHandle.h.
Referenced by Click(), GetLocation(), and Preview().
Definition at line 71 of file CutlineHandle.h.
|
private |
Definition at line 69 of file CutlineHandle.h.
Referenced by Click(), and GetTrack().
|
private |
Definition at line 72 of file CutlineHandle.h.