Audacity  2.2.0
EnvelopeHandle Class Referencefinal

#include <EnvelopeHandle.h>

Inheritance diagram for EnvelopeHandle:
UIHandle

Public Member Functions

 EnvelopeHandle (Envelope *pEnvelope)
 
virtual ~EnvelopeHandle ()
 
EnvelopeGetEnvelope () const
 
void Enter (bool forward) override
 
Result Click (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
Result Drag (const TrackPanelMouseEvent &event, AudacityProject *pProject) override
 
HitTestPreview Preview (const TrackPanelMouseState &state, const 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 bool HasRotation () const
 
virtual bool Rotate (bool forward)
 
virtual bool HasEscape () const
 
virtual bool Escape ()
 
virtual void DrawExtras (DrawingPass pass, wxDC *dc, const wxRegion &updateRegion, const wxRect &panelRect)
 
virtual void OnProjectChange (AudacityProject *pProject)
 
Result GetChangeHighlight () const
 
void SetChangeHighlight (Result val)
 

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 Public Member Functions inherited from UIHandle
static UIHandle::Result NeedChangeHighlight (const UIHandle &, const UIHandle &)
 

Private Member Functions

 EnvelopeHandle (const EnvelopeHandle &)=delete
 
EnvelopeHandleoperator= (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 {}
 
EnvelopemEnvelope {}
 
std::unique_ptr< EnvelopeEditormEnvelopeEditor
 
std::unique_ptr< EnvelopeEditormEnvelopeEditorRight
 
bool mTimeTrack {}
 

Additional Inherited Members

- Public Types inherited from UIHandle
enum  DrawingPass { Cells, Panel }
 
using Result = unsigned
 
using Cell = TrackPanelCell
 
- Protected Attributes inherited from UIHandle
Result mChangeHighlight { 0 }
 

Constructor & Destructor Documentation

EnvelopeHandle::EnvelopeHandle ( const EnvelopeHandle )
privatedelete
EnvelopeHandle::EnvelopeHandle ( Envelope pEnvelope)
explicit
EnvelopeHandle::~EnvelopeHandle ( )
virtual

Member Function Documentation

UIHandle::Result EnvelopeHandle::Cancel ( AudacityProject pProject)
overridevirtual
void EnvelopeHandle::Enter ( bool  forward)
overridevirtual

Reimplemented from UIHandle.

References UIHandle::mChangeHighlight, and RefreshCode::RefreshCell.

bool EnvelopeHandle::ForwardEventToEnvelopes ( const wxMouseEvent &  event,
const ViewInfo viewInfo 
)
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.

Envelope* EnvelopeHandle::GetEnvelope ( ) const
inline
UIHandlePtr EnvelopeHandle::HitAnywhere ( std::weak_ptr< EnvelopeHandle > &  holder,
Envelope envelope,
bool  timeTrack 
)
static
UIHandlePtr EnvelopeHandle::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 
)
staticprivate
EnvelopeHandle& EnvelopeHandle::operator= ( const EnvelopeHandle )
privatedelete
HitTestPreview EnvelopeHandle::Preview ( const TrackPanelMouseState state,
const AudacityProject pProject 
)
overridevirtual
UIHandle::Result EnvelopeHandle::Release ( const TrackPanelMouseEvent event,
AudacityProject pProject,
wxWindow *  pParent 
)
overridevirtual
bool EnvelopeHandle::StopsOnKeystroke ( )
inlineoverridevirtual

Reimplemented from UIHandle.

UIHandlePtr EnvelopeHandle::TimeTrackHitTest ( std::weak_ptr< EnvelopeHandle > &  holder,
const wxMouseState &  state,
const wxRect &  rect,
const AudacityProject pProject,
const std::shared_ptr< TimeTrack > &  tt 
)
static

References HitEnvelope().

Referenced by TimeTrack::DetailedHitTest().

UIHandlePtr EnvelopeHandle::WaveTrackHitTest ( std::weak_ptr< EnvelopeHandle > &  holder,
const wxMouseState &  state,
const wxRect &  rect,
const AudacityProject pProject,
const std::shared_ptr< WaveTrack > &  wt 
)
static

method that tells us if the mouse event landed on an envelope boundary.

References HitEnvelope(), and WaveTrack::Waveform.

Referenced by WaveTrack::DetailedHitTest().

Member Data Documentation

double EnvelopeHandle::mdBRange {}
private
Envelope* EnvelopeHandle::mEnvelope {}
private

Referenced by GetEnvelope().

std::unique_ptr<EnvelopeEditor> EnvelopeHandle::mEnvelopeEditor
private

Referenced by Cancel().

std::unique_ptr<EnvelopeEditor> EnvelopeHandle::mEnvelopeEditorRight
private

Referenced by Cancel().

bool EnvelopeHandle::mLog {}
private
float EnvelopeHandle::mLower {}
private
wxRect EnvelopeHandle::mRect {}
private
bool EnvelopeHandle::mTimeTrack {}
private
float EnvelopeHandle::mUpper {}
private

The documentation for this class was generated from the following files: