![]() |
Audacity 3.2.0
|
#include <EnvelopeHandle.h>
Public Member Functions | |
EnvelopeHandle (Envelope *pEnvelope) | |
EnvelopeHandle (EnvelopeHandle &&)=default | |
EnvelopeHandle & | operator= (EnvelopeHandle &&)=default |
virtual | ~EnvelopeHandle () |
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 |
![]() | |
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< EnvelopeHandle > &holder, Envelope *envelope, 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 | WaveTrackHitTest (std::weak_ptr< EnvelopeHandle > &holder, const wxMouseState &state, const wxRect &rect, const AudacityProject *pProject, const std::shared_ptr< WaveTrack > &wt) |
![]() | |
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 | |
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, 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::unique_ptr< EnvelopeEditor > | mpEnvelopeEditor |
bool | mTimeTrack {} |
Additional Inherited Members | |
![]() | |
using | Result = unsigned |
using | Cell = TrackPanelCell |
![]() | |
Result | mChangeHighlight { 0 } |
Definition at line 27 of file EnvelopeHandle.h.
|
privatedelete |
|
explicit |
Definition at line 33 of file EnvelopeHandle.cpp.
|
default |
|
virtual |
Definition at line 45 of file EnvelopeHandle.cpp.
|
overridevirtual |
Implements UIHandle.
Definition at line 285 of file EnvelopeHandle.cpp.
References ProjectHistory::Get(), mpEnvelopeEditor, RefreshCode::RefreshCell, and ProjectHistory::RollbackState().
Referenced by Drag(), and Release().
|
overridevirtual |
Implements UIHandle.
Definition at line 172 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 223 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 38 of file EnvelopeHandle.cpp.
References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.
|
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 292 of file EnvelopeHandle.cpp.
References mdBRange, mLog, mLower, mpEnvelopeEditor, mRect, and mUpper.
Referenced by Click(), Drag(), and Release().
|
inline |
Definition at line 59 of file EnvelopeHandle.h.
Referenced by anonymous_namespace{WaveformView.cpp}::DrawClipWaveform(), anonymous_namespace{TimeTrackView.cpp}::DrawHorzRulerAndCurve(), and EnvelopeEditor::DrawPoints().
|
static |
Definition at line 48 of file EnvelopeHandle.cpp.
References AssignUIHandlePtr().
Referenced by WaveformView::DetailedHitTest(), and HitEnvelope().
|
staticprivate |
Definition at line 117 of file EnvelopeHandle.cpp.
References ViewInfo::Get(), Envelope::GetValue(), GetWaveYPos(), and HitAnywhere().
Referenced by TimeTrackHitTest(), and WaveTrackHitTest().
|
privatedelete |
|
default |
|
overridevirtual |
Implements UIHandle.
Definition at line 239 of file EnvelopeHandle.cpp.
References ProjectAudioIO::Get(), ProjectAudioIO::IsAudioActive(), MakeCursor(), mTimeTrack, and XO().
|
overridevirtual |
Implements UIHandle.
Definition at line 260 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 73 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 90 of file EnvelopeHandle.cpp.
References WaveformSettings::dBRange, ViewInfo::Get(), WaveformSettings::Get(), WaveformScale::Get(), HitEnvelope(), and WaveformSettings::isLinear().
Referenced by WaveformView::DetailedHitTest().
|
private |
Definition at line 88 of file EnvelopeHandle.h.
Referenced by Click(), and ForwardEventToEnvelopes().
|
private |
Definition at line 90 of file EnvelopeHandle.h.
Referenced by Click().
|
private |
Definition at line 86 of file EnvelopeHandle.h.
Referenced by Click(), and ForwardEventToEnvelopes().
|
private |
Definition at line 87 of file EnvelopeHandle.h.
Referenced by Click(), and ForwardEventToEnvelopes().
|
private |
Definition at line 91 of file EnvelopeHandle.h.
Referenced by Cancel(), Click(), ForwardEventToEnvelopes(), and Release().
|
private |
Definition at line 85 of file EnvelopeHandle.h.
Referenced by Click(), and ForwardEventToEnvelopes().
|
private |
Definition at line 93 of file EnvelopeHandle.h.
Referenced by Preview().
|
private |
Definition at line 87 of file EnvelopeHandle.h.
Referenced by Click(), and ForwardEventToEnvelopes().