Audacity 3.2.0
|
#include <EnvelopeHandle.h>
Public Member Functions | |
EnvelopeHandle (Envelope *pEnvelope, std::weak_ptr< const Channel > wChannel) | |
EnvelopeHandle (EnvelopeHandle &&)=default | |
EnvelopeHandle & | operator= (EnvelopeHandle &&)=default |
virtual | ~EnvelopeHandle () |
std::shared_ptr< const Track > | FindTrack () const override |
Envelope * | GetEnvelope () const |
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 |
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< EnvelopeHandle > &holder, Envelope *envelope, std::weak_ptr< const Channel > wChannel, bool timeTrack) |
static UIHandlePtr | TimeTrackHitTest (std::weak_ptr< EnvelopeHandle > &holder, const wxMouseState &state, const wxRect &rect, const AudacityProject *pProject, const std::shared_ptr< TimeTrack > &tt) |
static UIHandlePtr | WaveChannelHitTest (std::weak_ptr< EnvelopeHandle > &holder, const wxMouseState &state, const wxRect &rect, const AudacityProject *pProject, const std::shared_ptr< WaveChannel > &wt) |
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) |
Private Member Functions | |
EnvelopeHandle (const EnvelopeHandle &)=delete | |
EnvelopeHandle & | operator= (const EnvelopeHandle &)=delete |
bool | ForwardEventToEnvelopes (const wxMouseEvent &event, const ViewInfo &viewInfo) |
Static Private Member Functions | |
static UIHandlePtr | HitEnvelope (std::weak_ptr< EnvelopeHandle > &holder, const wxMouseState &state, const wxRect &rect, const AudacityProject *pProject, Envelope *envelope, std::weak_ptr< const Channel > wChannel, float zoomMin, float zoomMax, bool dB, float dBRange, bool timeTrack) |
Private Attributes | |
wxRect | mRect {} |
bool | mLog {} |
float | mLower {} |
float | mUpper {} |
double | mdBRange {} |
Envelope * | mEnvelope {} |
std::weak_ptr< const Channel > | mwChannel |
std::unique_ptr< EnvelopeEditor > | mpEnvelopeEditor |
bool | mTimeTrack {} |
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 28 of file EnvelopeHandle.h.
|
privatedelete |
Definition at line 35 of file EnvelopeHandle.cpp.
|
default |
|
virtual |
Definition at line 49 of file EnvelopeHandle.cpp.
|
overridevirtual |
Implements UIHandle.
Definition at line 294 of file EnvelopeHandle.cpp.
References ProjectHistory::Get(), mpEnvelopeEditor, RefreshCode::RefreshCell, and ProjectHistory::RollbackState().
Referenced by Drag(), and Release().
|
overridevirtual |
Implements UIHandle.
Definition at line 182 of file EnvelopeHandle.cpp.
References Cancelled, WaveformSettings::dBRange, TrackPanelMouseEvent::event, ForwardEventToEnvelopes(), ProjectAudioIO::Get(), ViewInfo::Get(), WaveformSettings::Get(), WaveformScale::Get(), anonymous_namespace{EnvelopeHandle.cpp}::GetTimeTrackData(), ProjectAudioIO::IsAudioActive(), WaveformSettings::isLinear(), mdBRange, mEnvelope, mLog, mLower, mpEnvelopeEditor, mRect, mUpper, TrackPanelMouseEvent::pCell, TrackPanelMouseEvent::rect, RefreshCode::RefreshCell, and RefreshCode::RefreshNone.
|
overridevirtual |
Implements UIHandle.
Definition at line 232 of file EnvelopeHandle.cpp.
References Cancel(), Cancelled, TrackPanelMouseEvent::event, ForwardEventToEnvelopes(), ProjectAudioIO::Get(), ViewInfo::Get(), ProjectAudioIO::IsAudioActive(), RefreshCode::RefreshCell, and RefreshCode::RefreshNone.
|
overridevirtual |
Reimplemented from UIHandle.
Definition at line 42 of file EnvelopeHandle.cpp.
References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.
|
overridevirtual |
Implements UIHandle.
Definition at line 52 of file EnvelopeHandle.cpp.
References mwChannel, and UIHandle::TrackFromChannel().
|
private |
The Envelope class actually handles things at the mouse event level, so we have to forward the events over. Envelope will then tell us whether or not we need to redraw.
Definition at line 301 of file EnvelopeHandle.cpp.
References mdBRange, mLog, mLower, mpEnvelopeEditor, mRect, and mUpper.
Referenced by Click(), Drag(), and Release().
|
inline |
Definition at line 61 of file EnvelopeHandle.h.
Referenced by anonymous_namespace{WaveformView.cpp}::DrawClipWaveform(), anonymous_namespace{TimeTrackView.cpp}::DrawHorzRulerAndCurve(), and EnvelopeEditor::DrawPoints().
|
static |
Definition at line 57 of file EnvelopeHandle.cpp.
References AssignUIHandlePtr().
Referenced by WaveformView::DetailedHitTest(), and HitEnvelope().
|
staticprivate |
Definition at line 126 of file EnvelopeHandle.cpp.
References ViewInfo::Get(), Envelope::GetValue(), GetWaveYPos(), and HitAnywhere().
Referenced by TimeTrackHitTest(), and WaveChannelHitTest().
|
privatedelete |
|
default |
|
overridevirtual |
Implements UIHandle.
Definition at line 248 of file EnvelopeHandle.cpp.
References ProjectAudioIO::Get(), ProjectAudioIO::IsAudioActive(), MakeCursor(), mTimeTrack, and XO().
|
overridevirtual |
Implements UIHandle.
Definition at line 269 of file EnvelopeHandle.cpp.
References Cancel(), TrackPanelMouseEvent::event, ForwardEventToEnvelopes(), ProjectAudioIO::Get(), ProjectHistory::Get(), ViewInfo::Get(), ProjectAudioIO::IsAudioActive(), mpEnvelopeEditor, ProjectHistory::PushState(), RefreshCode::RefreshCell, RefreshCode::RefreshNone, and XO().
|
inlineoverridevirtual |
|
static |
Definition at line 83 of file EnvelopeHandle.cpp.
References anonymous_namespace{EnvelopeHandle.cpp}::GetTimeTrackData(), and HitEnvelope().
Referenced by TimeTrackView::DetailedHitTest().
|
static |
method that tells us if the mouse event landed on an envelope boundary.
Definition at line 100 of file EnvelopeHandle.cpp.
References WaveformSettings::dBRange, ViewInfo::Get(), WaveformSettings::Get(), WaveformScale::Get(), WaveChannelUtilities::GetEnvelopeAtTime(), HitEnvelope(), and WaveformSettings::isLinear().
Referenced by WaveformView::DetailedHitTest().
|
private |
Definition at line 90 of file EnvelopeHandle.h.
Referenced by Click(), and ForwardEventToEnvelopes().
|
private |
Definition at line 92 of file EnvelopeHandle.h.
Referenced by Click().
|
private |
Definition at line 88 of file EnvelopeHandle.h.
Referenced by Click(), and ForwardEventToEnvelopes().
|
private |
Definition at line 89 of file EnvelopeHandle.h.
Referenced by Click(), and ForwardEventToEnvelopes().
|
private |
Definition at line 94 of file EnvelopeHandle.h.
Referenced by Cancel(), Click(), ForwardEventToEnvelopes(), and Release().
|
private |
Definition at line 87 of file EnvelopeHandle.h.
Referenced by Click(), and ForwardEventToEnvelopes().
|
private |
Definition at line 96 of file EnvelopeHandle.h.
Referenced by Preview().
|
private |
Definition at line 89 of file EnvelopeHandle.h.
Referenced by Click(), and ForwardEventToEnvelopes().
|
private |
Definition at line 93 of file EnvelopeHandle.h.
Referenced by FindTrack().