Audacity 3.2.0
|
Implements some features which are specific to Wave Clips. More...
#include <WaveTrackAffordanceHandle.h>
Public Member Functions | |
WaveTrackAffordanceHandle (const std::shared_ptr< Track > &track, const std::shared_ptr< ClipTimes > &target) | |
Result | Click (const TrackPanelMouseEvent &event, AudacityProject *project) override |
UIHandle::Result | SelectAt (const TrackPanelMouseEvent &event, AudacityProject *project) override |
bool | HandlesRightClick () override |
Whether the handle has any special right-button handling. More... | |
UIHandle::Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override |
Public Member Functions inherited from AffordanceHandle | |
void | Enter (bool forward, AudacityProject *pProject) override |
HitTestPreview | Preview (const TrackPanelMouseState &mouseState, AudacityProject *pProject) override |
AffordanceHandle (const std::shared_ptr< Track > &track) | |
Result | Click (const TrackPanelMouseEvent &evt, AudacityProject *pProject) override |
Result | Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) override |
Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override |
Public Member Functions inherited from TimeShiftHandle | |
TimeShiftHandle (std::shared_ptr< Track > pTrack, bool gripHit) | |
TimeShiftHandle & | operator= (TimeShiftHandle &&)=default |
bool | IsGripHit () const |
virtual | ~TimeShiftHandle () |
std::shared_ptr< const Track > | FindTrack () const override |
void | Enter (bool forward, AudacityProject *) override |
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 |
bool | Clicked () const |
std::shared_ptr< Track > | GetTrack () const |
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) |
Private Attributes | |
std::shared_ptr< ClipTimes > | mTarget |
Additional Inherited Members | |
Public Types inherited from UIHandle | |
using | Result = unsigned |
using | Cell = TrackPanelCell |
Static Public Member Functions inherited from TimeShiftHandle | |
static UIHandlePtr | HitAnywhere (std::weak_ptr< TimeShiftHandle > &holder, const std::shared_ptr< Track > &pTrack, bool gripHit) |
static UIHandlePtr | HitTest (std::weak_ptr< TimeShiftHandle > &holder, const wxMouseState &state, const wxRect &rect, const std::shared_ptr< Track > &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) |
virtual Result | SelectAt (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0 |
Protected Member Functions inherited from TimeShiftHandle | |
bool | WasMoved () const |
Protected Attributes inherited from UIHandle | |
Result | mChangeHighlight { 0 } |
Implements some features which are specific to Wave Clips.
Definition at line 18 of file WaveTrackAffordanceHandle.h.
WaveTrackAffordanceHandle::WaveTrackAffordanceHandle | ( | const std::shared_ptr< Track > & | track, |
const std::shared_ptr< ClipTimes > & | target | ||
) |
Definition at line 24 of file WaveTrackAffordanceHandle.cpp.
|
overridevirtual |
Implements UIHandle.
Definition at line 28 of file WaveTrackAffordanceHandle.cpp.
References RefreshCode::Cancelled, AffordanceHandle::Click(), WaveChannelView::ClipDetailsVisible(), TrackPanelMouseEvent::event, ViewInfo::Get(), mTarget, TrackPanelMouseEvent::pCell, project, TrackPanelMouseEvent::rect, and RefreshCode::RefreshNone.
|
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 62 of file WaveTrackAffordanceHandle.cpp.
|
overridevirtual |
Implements UIHandle.
Definition at line 67 of file WaveTrackAffordanceHandle.cpp.
References TrackPanelMouseEvent::event, PitchAndSpeedDialog::Get(), TrackPanelMouseEvent::rect, AffordanceHandle::Release(), and PitchAndSpeedDialog::TryRetarget().
|
overridevirtual |
Implements AffordanceHandle.
Definition at line 52 of file WaveTrackAffordanceHandle.cpp.
References RefreshCode::Cancelled, ProjectHistory::Get(), ViewInfo::Get(), ProjectHistory::ModifyState(), mTarget, project, and RefreshCode::RefreshAll.
|
private |
Definition at line 20 of file WaveTrackAffordanceHandle.h.
Referenced by Click(), and SelectAt().