Audacity 3.2.0
|
Public Types | |
using | AdjustHandler = std::function< void(WaveTrack::Interval &, double)> |
Public Member Functions | |
AdjustClipBorder (AdjustHandler adjustHandler, std::shared_ptr< WaveTrack > track, std::shared_ptr< WaveTrack::Interval > interval, bool adjustLeftBorder, bool isStretchMode, const ZoomInfo &zoomInfo) | |
bool | Init (const TrackPanelMouseEvent &event) override |
UIHandle::Result | Drag (const TrackPanelMouseEvent &event, AudacityProject &project) override |
void | Finish (AudacityProject &project) override |
void | Cancel () 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 WaveClipAdjustBorderHandle::AdjustPolicy | |
virtual | ~AdjustPolicy () |
virtual bool | Init (const TrackPanelMouseEvent &event)=0 |
virtual UIHandle::Result | Drag (const TrackPanelMouseEvent &event, AudacityProject &project)=0 |
virtual void | Finish (AudacityProject &project)=0 |
virtual void | Cancel ()=0 |
virtual void | Draw (TrackPanelDrawingContext &context, const wxRect &rect, unsigned iPass) |
virtual wxRect | DrawingArea (TrackPanelDrawingContext &, const wxRect &rect, const wxRect &panelRect, unsigned iPass) |
Private Member Functions | |
void | TrimTo (double t) |
Static Private Member Functions | |
static SnapPointArray | FindSnapPoints (const WaveTrack *currentTrack, const std::pair< double, double > range) |
Private Attributes | |
std::shared_ptr< WaveTrack > | mTrack |
std::shared_ptr< WaveTrack::Interval > | mInterval |
int | mDragStartX { } |
const bool | mAdjustingLeftBorder |
const bool | mIsStretchMode |
const double | mInitialBorderPosition |
double | mBorderPosition |
const std::pair< double, double > | mRange |
AdjustHandler | mAdjustHandler |
std::unique_ptr< SnapManager > | mSnapManager |
SnapResults | mSnap |
Definition at line 125 of file WaveClipAdjustBorderHandle.cpp.
using AdjustClipBorder::AdjustHandler = std::function<void(WaveTrack::Interval&, double)> |
Definition at line 128 of file WaveClipAdjustBorderHandle.cpp.
|
inline |
Definition at line 190 of file WaveClipAdjustBorderHandle.cpp.
References FindSnapPoints(), mRange, mSnapManager, and mTrack.
|
inlineoverridevirtual |
Implements WaveClipAdjustBorderHandle::AdjustPolicy.
Definition at line 288 of file WaveClipAdjustBorderHandle.cpp.
References mInitialBorderPosition, and TrimTo().
|
inlineoverridevirtual |
Implements WaveClipAdjustBorderHandle::AdjustPolicy.
Definition at line 227 of file WaveClipAdjustBorderHandle.cpp.
References sampleCount::as_double(), ViewInfo::Get(), mAdjustingLeftBorder, mDragStartX, mInitialBorderPosition, mRange, mSnap, mSnapManager, mTrack, SnapResults::outTime, project, TrackPanelMouseEvent::rect, RefreshCode::RefreshAll, RefreshCode::RefreshCell, SnapResults::Snapped(), and TrimTo().
|
inlineoverridevirtual |
Reimplemented from WaveClipAdjustBorderHandle::AdjustPolicy.
Definition at line 293 of file WaveClipAdjustBorderHandle.cpp.
References TrackPanelDrawingContext::dc, TrackArt::DrawSnapLines(), mSnap, SnapResults::outCoord, TrackArtist::PassSnapping, and SnapResults::Snapped().
|
inlineoverridevirtual |
Reimplemented from WaveClipAdjustBorderHandle::AdjustPolicy.
Definition at line 302 of file WaveClipAdjustBorderHandle.cpp.
References TrackPanelDrawable::MaximizeHeight(), and TrackArtist::PassSnapping.
|
inlinestaticprivate |
Definition at line 152 of file WaveClipAdjustBorderHandle.cpp.
References Track::GetOwner().
Referenced by AdjustClipBorder().
|
inlineoverridevirtual |
Implements WaveClipAdjustBorderHandle::AdjustPolicy.
Definition at line 261 of file WaveClipAdjustBorderHandle.cpp.
References ProjectHistory::Get(), mAdjustingLeftBorder, mBorderPosition, mInitialBorderPosition, mInterval, mIsStretchMode, project, WaveClipUIUtilities::PushClipSpeedChangedUndoState(), ProjectHistory::PushState(), and XO().
|
inlineoverridevirtual |
Implements WaveClipAdjustBorderHandle::AdjustPolicy.
Definition at line 217 of file WaveClipAdjustBorderHandle.cpp.
References TrackPanelMouseEvent::event, and mDragStartX.
|
inlineprivate |
Definition at line 144 of file WaveClipAdjustBorderHandle.cpp.
References mAdjustHandler, mBorderPosition, mInterval, and mRange.
Referenced by Cancel(), and Drag().
|
private |
Definition at line 139 of file WaveClipAdjustBorderHandle.cpp.
Referenced by TrimTo().
|
private |
Definition at line 134 of file WaveClipAdjustBorderHandle.cpp.
|
private |
Definition at line 137 of file WaveClipAdjustBorderHandle.cpp.
|
private |
Definition at line 133 of file WaveClipAdjustBorderHandle.cpp.
|
private |
Definition at line 136 of file WaveClipAdjustBorderHandle.cpp.
|
private |
Definition at line 132 of file WaveClipAdjustBorderHandle.cpp.
|
private |
Definition at line 135 of file WaveClipAdjustBorderHandle.cpp.
Referenced by Finish().
|
private |
Definition at line 138 of file WaveClipAdjustBorderHandle.cpp.
Referenced by AdjustClipBorder(), Drag(), and TrimTo().
|
private |
Definition at line 142 of file WaveClipAdjustBorderHandle.cpp.
|
private |
Definition at line 141 of file WaveClipAdjustBorderHandle.cpp.
Referenced by AdjustClipBorder(), and Drag().
|
private |
Definition at line 131 of file WaveClipAdjustBorderHandle.cpp.
Referenced by AdjustClipBorder(), and Drag().