Audacity 3.2.0
|
#include <WaveClipAdjustBorderHandle.h>
Classes | |
class | AdjustPolicy |
Public Member Functions | |
WaveClipAdjustBorderHandle (std::unique_ptr< AdjustPolicy > &adjustPolicy, std::shared_ptr< const WaveTrack > pTrack, bool stretchMode, bool leftBorder) | |
~WaveClipAdjustBorderHandle () override | |
std::shared_ptr< const Track > | FindTrack () const override |
WaveClipAdjustBorderHandle (WaveClipAdjustBorderHandle &&) noexcept | |
WaveClipAdjustBorderHandle & | operator= (WaveClipAdjustBorderHandle &&) noexcept |
HitTestPreview | Preview (const TrackPanelMouseState &mouseState, AudacityProject *pProject) override |
Result | Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) override |
Result | Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) override |
Result | Release (const TrackPanelMouseEvent &event, AudacityProject *pProject, wxWindow *pParent) override |
Result | Cancel (AudacityProject *pProject) override |
void | Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) override |
wxRect | DrawingArea (TrackPanelDrawingContext &, const wxRect &rect, const wxRect &panelRect, unsigned iPass) 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 (std::weak_ptr< WaveClipAdjustBorderHandle > &holder, const std::shared_ptr< WaveTrack > &waveTrack, const AudacityProject *pProject, const TrackPanelMouseState &state) |
static UIHandlePtr | HitTest (std::weak_ptr< WaveClipAdjustBorderHandle > &holder, WaveChannelView &view, const AudacityProject *pProject, const TrackPanelMouseState &state) |
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) |
Static Private Member Functions | |
static HitTestPreview | HitPreviewTrim (const AudacityProject *, bool unsafe, bool isLeftBorder) |
static HitTestPreview | HitPreviewStretch (const AudacityProject *, bool unsafe, bool isLeftBorder) |
Private Attributes | |
std::unique_ptr< AdjustPolicy > | mAdjustPolicy {} |
std::shared_ptr< const WaveTrack > | mpTrack |
bool | mIsStretchMode |
bool | mIsLeftBorder |
Static Private Attributes | |
static constexpr int | BoundaryThreshold = 5 |
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 19 of file WaveClipAdjustBorderHandle.h.
WaveClipAdjustBorderHandle::WaveClipAdjustBorderHandle | ( | std::unique_ptr< AdjustPolicy > & | adjustPolicy, |
std::shared_ptr< const WaveTrack > | pTrack, | ||
bool | stretchMode, | ||
bool | leftBorder | ||
) |
Definition at line 346 of file WaveClipAdjustBorderHandle.cpp.
|
overridedefault |
|
defaultnoexcept |
|
overridevirtual |
Implements UIHandle.
Definition at line 523 of file WaveClipAdjustBorderHandle.cpp.
References mAdjustPolicy, and RefreshCode::RefreshAll.
|
overridevirtual |
Implements UIHandle.
Definition at line 498 of file WaveClipAdjustBorderHandle.cpp.
References RefreshCode::Cancelled, ProjectAudioIO::Get(), ProjectAudioIO::IsAudioActive(), mAdjustPolicy, and RefreshCode::RefreshNone.
|
overridevirtual |
Implements UIHandle.
Definition at line 509 of file WaveClipAdjustBorderHandle.cpp.
References mAdjustPolicy, and project.
|
overridevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 529 of file WaveClipAdjustBorderHandle.cpp.
References mAdjustPolicy.
|
overridevirtual |
Reimplemented from TrackPanelDrawable.
Definition at line 534 of file WaveClipAdjustBorderHandle.cpp.
References mAdjustPolicy.
|
overridevirtual |
Implements UIHandle.
Definition at line 361 of file WaveClipAdjustBorderHandle.cpp.
References mpTrack.
|
static |
Definition at line 377 of file WaveClipAdjustBorderHandle.cpp.
References AssignUIHandlePtr(), BoundaryThreshold, WaveChannelView::ClipDetailsVisible(), ViewInfo::Get(), ClipParameters::GetClipRect(), TrackPanelMouseState::rect, TrackPanelMouseState::state, anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::StretchLeftTo(), anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::StretchRightTo(), anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::TrimLeftTo(), and anonymous_namespace{WaveClipAdjustBorderHandle.cpp}::TrimRightTo().
Referenced by WaveTrackAffordanceControls::HitTest(), and HitTest().
|
staticprivate |
Definition at line 328 of file WaveClipAdjustBorderHandle.cpp.
References MakeCursor(), and XO().
Referenced by Preview().
|
staticprivate |
Definition at line 310 of file WaveClipAdjustBorderHandle.cpp.
References MakeCursor(), and XO().
Referenced by Preview().
|
static |
Definition at line 462 of file WaveClipAdjustBorderHandle.cpp.
References WaveChannelView::FindWaveChannel(), HitAnywhere(), TrackPanelMouseState::rect, and TrackPanelMouseState::state.
Referenced by WaveChannelSubView::DoDetailedHitTest().
|
defaultnoexcept |
|
overridevirtual |
Implements UIHandle.
Definition at line 490 of file WaveClipAdjustBorderHandle.cpp.
References ProjectAudioIO::Get(), HitPreviewStretch(), HitPreviewTrim(), ProjectAudioIO::IsAudioActive(), mIsLeftBorder, and mIsStretchMode.
|
overridevirtual |
Implements UIHandle.
Definition at line 515 of file WaveClipAdjustBorderHandle.cpp.
References mAdjustPolicy, project, and RefreshCode::RefreshAll.
|
staticconstexprprivate |
Definition at line 25 of file WaveClipAdjustBorderHandle.h.
Referenced by HitAnywhere().
|
private |
Definition at line 30 of file WaveClipAdjustBorderHandle.h.
Referenced by Cancel(), Click(), Drag(), Draw(), DrawingArea(), and Release().
|
private |
Definition at line 33 of file WaveClipAdjustBorderHandle.h.
Referenced by Preview().
|
private |
Definition at line 32 of file WaveClipAdjustBorderHandle.h.
Referenced by Preview().
|
private |
Definition at line 31 of file WaveClipAdjustBorderHandle.h.
Referenced by FindTrack().