![]() |
Audacity 3.2.0
|
#include <TrackSelectHandle.h>
Public Member Functions | |
TrackSelectHandle (const std::shared_ptr< Track > &pTrack) | |
TrackSelectHandle & | operator= (const TrackSelectHandle &)=default |
virtual | ~TrackSelectHandle () |
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 *) 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 (std::weak_ptr< TrackSelectHandle > &holder, const std::shared_ptr< Track > &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 Member Functions | |
TrackSelectHandle (const TrackSelectHandle &)=delete | |
void | CalculateRearrangingThresholds (const wxMouseEvent &event, AudacityProject *project) |
Private Attributes | |
std::shared_ptr< Track > | mpTrack |
bool | mClicked {} |
int | mMoveUpThreshold {} |
int | mMoveDownThreshold {} |
int | mRearrangeCount {} |
Additional Inherited Members | |
![]() | |
using | Result = unsigned |
using | Cell = TrackPanelCell |
![]() | |
Result | mChangeHighlight { 0 } |
Definition at line 19 of file TrackSelectHandle.h.
|
privatedelete |
|
explicit |
Definition at line 51 of file TrackSelectHandle.cpp.
|
virtual |
Definition at line 64 of file TrackSelectHandle.cpp.
|
private |
Figure out how far the user must drag the mouse up or down before the track will swap with the one above or below
Definition at line 217 of file TrackSelectHandle.cpp.
References TrackList::Get(), ChannelView::GetChannelGroupHeight(), mMoveDownThreshold, mMoveUpThreshold, mpTrack, project, and tracks.
Referenced by Click(), and Drag().
|
overridevirtual |
Implements UIHandle.
Definition at line 207 of file TrackSelectHandle.cpp.
References ProjectHistory::Get(), mpTrack, RefreshCode::RefreshAll, and ProjectHistory::RollbackState().
|
overridevirtual |
Implements UIHandle.
Definition at line 68 of file TrackSelectHandle.cpp.
References CalculateRearrangingThresholds(), Cancelled, SelectUtilities::DoListSelection(), TrackPanelMouseEvent::event, ProjectAudioIO::Get(), ProjectAudioIO::IsAudioActive(), mClicked, mpTrack, mRearrangeCount, and RefreshCode::RefreshNone.
|
overridevirtual |
Implements UIHandle.
Definition at line 109 of file TrackSelectHandle.cpp.
References CalculateRearrangingThresholds(), RefreshCode::EnsureVisible, TrackPanelMouseEvent::event, ProjectAudioIO::Get(), TrackList::Get(), ProjectAudioIO::IsAudioActive(), mMoveDownThreshold, mMoveUpThreshold, mpTrack, mRearrangeCount, RefreshCode::RefreshAll, RefreshCode::RefreshNone, tracks, and TrackPanelMouseEvent::whole.
|
static |
Definition at line 55 of file TrackSelectHandle.cpp.
References AssignUIHandlePtr().
Referenced by CommonTrackControls::HitTest().
|
default |
|
overridevirtual |
Implements UIHandle.
Definition at line 144 of file TrackSelectHandle.cpp.
References TrackList::Any(), ProjectAudioIO::Get(), TrackList::Get(), ProjectAudioIO::IsAudioActive(), MakeCursor(), mClicked, and anonymous_namespace{TrackSelectHandle.cpp}::Message().
|
overridevirtual |
Implements UIHandle.
Definition at line 186 of file TrackSelectHandle.cpp.
References ProjectHistory::Get(), mpTrack, mRearrangeCount, ProjectHistory::PushState(), RefreshCode::RefreshNone, and XO().
|
inlineoverridevirtual |
|
private |
Definition at line 54 of file TrackSelectHandle.h.
|
private |
Definition at line 59 of file TrackSelectHandle.h.
Referenced by CalculateRearrangingThresholds(), and Drag().
|
private |
Definition at line 58 of file TrackSelectHandle.h.
Referenced by CalculateRearrangingThresholds(), and Drag().
|
private |
Definition at line 53 of file TrackSelectHandle.h.
Referenced by CalculateRearrangingThresholds(), Cancel(), Click(), Drag(), and Release().
|
private |
Definition at line 60 of file TrackSelectHandle.h.