Audacity 3.2.0
|
#include <AffordanceHandle.h>
Public Member Functions | |
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) |
Protected Member Functions | |
virtual Result | SelectAt (const TrackPanelMouseEvent &event, AudacityProject *pProject)=0 |
Protected Member Functions inherited from TimeShiftHandle | |
bool | WasMoved () const |
Private Member Functions | |
Result | UpdateTrackSelection (const TrackPanelMouseEvent &event, AudacityProject *pProject) |
Static Private Member Functions | |
static HitTestPreview | HitPreview (const AudacityProject *, bool unsafe, bool moving) |
Private Attributes | |
bool | mMoving { false } |
wxPoint | mClickPosition { } |
Static Private Attributes | |
static constexpr double | MoveThreshold { 5.0 } |
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) |
Protected Attributes inherited from UIHandle | |
Result | mChangeHighlight { 0 } |
Audacity: A Digital Audio Editor
Vitaly Sverchinsky
Definition at line 15 of file AffordanceHandle.h.
AffordanceHandle::AffordanceHandle | ( | const std::shared_ptr< Track > & | track | ) |
Definition at line 58 of file AffordanceHandle.cpp.
|
overridevirtual |
Implements UIHandle.
Definition at line 63 of file AffordanceHandle.cpp.
References TimeShiftHandle::Click(), TrackPanelMouseEvent::event, mClickPosition, and RefreshCode::RefreshCell.
Referenced by WaveTrackAffordanceHandle::Click().
|
overridevirtual |
Implements UIHandle.
Definition at line 70 of file AffordanceHandle.cpp.
References TimeShiftHandle::Drag(), TrackPanelMouseEvent::event, mClickPosition, mMoving, MoveThreshold, and RefreshCode::RefreshNone.
|
overridevirtual |
Reimplemented from UIHandle.
Definition at line 46 of file AffordanceHandle.cpp.
References TimeShiftHandle::Enter(), forward, RefreshCode::RefreshCell, RefreshCode::RefreshLatestCell, and UIHandle::SetChangeHighlight().
|
staticprivate |
Audacity: A Digital Audio Editor
Vitaly Sverchinsky
Definition at line 25 of file AffordanceHandle.cpp.
References handOpenCursor, MakeCursor(), and XO().
Referenced by Preview().
|
overridevirtual |
Implements UIHandle.
Definition at line 52 of file AffordanceHandle.cpp.
References TimeShiftHandle::Clicked(), ProjectAudioIO::Get(), HitPreview(), and ProjectAudioIO::IsAudioActive().
|
overridevirtual |
Implements UIHandle.
Definition at line 85 of file AffordanceHandle.cpp.
References TimeShiftHandle::Release(), UpdateTrackSelection(), and TimeShiftHandle::WasMoved().
Referenced by WaveTrackAffordanceHandle::Release().
|
protectedpure virtual |
Implemented in NoteTrackAffordanceHandle, and WaveTrackAffordanceHandle.
Referenced by UpdateTrackSelection().
|
private |
Definition at line 93 of file AffordanceHandle.cpp.
References SelectionState::Get(), TrackList::Get(), TimeShiftHandle::GetTrack(), RefreshCode::RefreshNone, and SelectAt().
Referenced by Release().
|
private |
Definition at line 22 of file AffordanceHandle.h.
|
private |
Definition at line 21 of file AffordanceHandle.h.
Referenced by Drag().
|
staticconstexprprivate |
Definition at line 17 of file AffordanceHandle.h.
Referenced by Drag().