Audacity  3.0.3
Public Member Functions | Static Public Member Functions | Private Member Functions | Static Private Member Functions | Private Attributes | List of all members
EnvelopeHandle Class Referencefinal

#include <EnvelopeHandle.h>

Inheritance diagram for EnvelopeHandle:
[legend]
Collaboration diagram for EnvelopeHandle:
[legend]

Public Member Functions

 EnvelopeHandle (Envelope *pEnvelope)
 
 EnvelopeHandle (EnvelopeHandle &&)=default
 
EnvelopeHandleoperator= (EnvelopeHandle &&)=default
 
virtual ~EnvelopeHandle ()
 
EnvelopeGetEnvelope () 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 bool HasRotation () const
 
virtual bool Rotate (bool forward)
 
virtual bool HasEscape () const
 
virtual bool Escape (AudacityProject *pProject)
 
virtual bool HandlesRightClick ()
 Whether the handle has any special right-button handling. More...
 
virtual void OnProjectChange (AudacityProject *pProject)
 
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, 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 &)
 
- 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
 
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::vector< std::unique_ptr< EnvelopeEditor > > mEnvelopeEditors
 
bool mTimeTrack {}
 

Additional Inherited Members

- Public Types inherited from UIHandle
using Result = unsigned
 
using Cell = TrackPanelCell
 
- Protected Attributes inherited from UIHandle
Result mChangeHighlight { 0 }
 

Detailed Description

Definition at line 27 of file EnvelopeHandle.h.

Constructor & Destructor Documentation

◆ EnvelopeHandle() [1/3]

EnvelopeHandle::EnvelopeHandle ( const EnvelopeHandle )
privatedelete

◆ EnvelopeHandle() [2/3]

EnvelopeHandle::EnvelopeHandle ( Envelope pEnvelope)
explicit

Definition at line 30 of file EnvelopeHandle.cpp.

31  : mEnvelope{ pEnvelope }
32 {
33 }

◆ EnvelopeHandle() [3/3]

EnvelopeHandle::EnvelopeHandle ( EnvelopeHandle &&  )
default

◆ ~EnvelopeHandle()

EnvelopeHandle::~EnvelopeHandle ( )
virtual

Definition at line 42 of file EnvelopeHandle.cpp.

43 {}

Member Function Documentation

◆ Cancel()

UIHandle::Result EnvelopeHandle::Cancel ( AudacityProject pProject)
overridevirtual

Implements UIHandle.

Definition at line 298 of file EnvelopeHandle.cpp.

299 {
300  ProjectHistory::Get( *pProject ).RollbackState();
301  mEnvelopeEditors.clear();
303 }

References ProjectHistory::Get(), mEnvelopeEditors, RefreshCode::RefreshCell, and ProjectHistory::RollbackState().

Referenced by Drag(), and Release().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ Click()

UIHandle::Result EnvelopeHandle::Click ( const TrackPanelMouseEvent event,
AudacityProject pProject 
)
overridevirtual

Implements UIHandle.

Definition at line 166 of file EnvelopeHandle.cpp.

168 {
169  using namespace RefreshCode;
170  const bool unsafe = ProjectAudioIO::Get( *pProject ).IsAudioActive();
171  if ( unsafe )
172  return Cancelled;
173 
174  const wxMouseEvent &event = evt.event;
175  const auto &viewInfo = ViewInfo::Get( *pProject );
176  const auto pView = std::static_pointer_cast<TrackView>(evt.pCell);
177  const auto pTrack = pView ? pView->FindTrack().get() : nullptr;
178 
179  mEnvelopeEditors.clear();
180 
181  unsigned result = Cancelled;
182  if (pTrack)
183  result = pTrack->TypeSwitch< decltype(RefreshNone) >(
184  [&](WaveTrack *wt) {
185  if (!mEnvelope)
186  return Cancelled;
187 
188  mLog = !wt->GetWaveformSettings().isLinear();
189  wt->GetDisplayBounds(&mLower, &mUpper);
190  mdBRange = wt->GetWaveformSettings().dBRange;
191  auto channels = TrackList::Channels( wt );
192  for ( auto channel : channels ) {
193  if (channel == wt)
194  mEnvelopeEditors.push_back(
195  std::make_unique< EnvelopeEditor >( *mEnvelope, true ) );
196  else {
197  auto time =
198  viewInfo.PositionToTime(event.GetX(), evt.rect.GetX());
199  auto e2 = channel->GetEnvelopeAtTime(time);
200  if (e2)
201  mEnvelopeEditors.push_back(
202  std::make_unique< EnvelopeEditor >( *e2, true ) );
203  else {
204  // There isn't necessarily an envelope there; no guarantee a
205  // linked track has the same WaveClip structure...
206  }
207  }
208  }
209 
210  return RefreshNone;
211  },
212  [&](TimeTrack *tt) {
213  if (!mEnvelope)
214  return Cancelled;
215  GetTimeTrackData( *pProject, *tt, mdBRange, mLog, mLower, mUpper);
216  mEnvelopeEditors.push_back(
217  std::make_unique< EnvelopeEditor >( *mEnvelope, false )
218  );
219 
220  return RefreshNone;
221  },
222  [](Track *) {
223  return Cancelled;
224  }
225  );
226 
227  if (result & Cancelled)
228  return result;
229 
230  mRect = evt.rect;
231 
232  const bool needUpdate = ForwardEventToEnvelopes(event, viewInfo);
233  return needUpdate ? RefreshCell : RefreshNone;
234 }

References RefreshCode::Cancelled, TrackList::Channels(), TrackPanelMouseEvent::event, ForwardEventToEnvelopes(), ViewInfo::Get(), ProjectAudioIO::Get(), anonymous_namespace{EnvelopeHandle.cpp}::GetTimeTrackData(), ProjectAudioIO::IsAudioActive(), mdBRange, mEnvelope, mEnvelopeEditors, mLog, mLower, mRect, mUpper, TrackPanelMouseEvent::pCell, TrackPanelMouseEvent::rect, RefreshCode::RefreshCell, and RefreshCode::RefreshNone.

Here is the call graph for this function:

◆ Drag()

UIHandle::Result EnvelopeHandle::Drag ( const TrackPanelMouseEvent event,
AudacityProject pProject 
)
overridevirtual

Implements UIHandle.

Definition at line 236 of file EnvelopeHandle.cpp.

238 {
239  using namespace RefreshCode;
240  const wxMouseEvent &event = evt.event;
241  const auto &viewInfo = ViewInfo::Get( *pProject );
242  const bool unsafe = ProjectAudioIO::Get( *pProject ).IsAudioActive();
243  if (unsafe) {
244  this->Cancel(pProject);
245  return RefreshCell | Cancelled;
246  }
247 
248  const bool needUpdate = ForwardEventToEnvelopes(event, viewInfo);
249  return needUpdate ? RefreshCell : RefreshNone;
250 }

References Cancel(), RefreshCode::Cancelled, TrackPanelMouseEvent::event, ForwardEventToEnvelopes(), ViewInfo::Get(), ProjectAudioIO::Get(), ProjectAudioIO::IsAudioActive(), RefreshCode::RefreshCell, and RefreshCode::RefreshNone.

Here is the call graph for this function:

◆ Enter()

void EnvelopeHandle::Enter ( bool  forward,
AudacityProject  
)
overridevirtual

Reimplemented from UIHandle.

Definition at line 35 of file EnvelopeHandle.cpp.

36 {
37 #ifdef EXPERIMENTAL_TRACK_PANEL_HIGHLIGHTING
39 #endif
40 }

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

◆ ForwardEventToEnvelopes()

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.

Definition at line 305 of file EnvelopeHandle.cpp.

307 {
311 
312  // AS: I'm not sure why we can't let the Envelope take care of
313  // redrawing itself. ?
314  bool needUpdate = false;
315  for (const auto &pEditor : mEnvelopeEditors) {
316  needUpdate =
317  pEditor->MouseEvent(
318  event, mRect, viewInfo, mLog, mdBRange, mLower, mUpper)
319  || needUpdate;
320  }
321 
322  return needUpdate;
323 }

References mdBRange, mEnvelopeEditors, mLog, mLower, mRect, and mUpper.

Referenced by Click(), Drag(), and Release().

Here is the caller graph for this function:

◆ GetEnvelope()

Envelope* EnvelopeHandle::GetEnvelope ( ) const
inline

Definition at line 59 of file EnvelopeHandle.h.

59 { return mEnvelope; }

Referenced by anonymous_namespace{WaveformView.cpp}::DrawClipWaveform(), anonymous_namespace{TimeTrackView.cpp}::DrawHorzRulerAndCurve(), and EnvelopeEditor::DrawPoints().

Here is the caller graph for this function:

◆ HitAnywhere()

UIHandlePtr EnvelopeHandle::HitAnywhere ( std::weak_ptr< EnvelopeHandle > &  holder,
Envelope envelope,
bool  timeTrack 
)
static

Definition at line 45 of file EnvelopeHandle.cpp.

47 {
48  auto result = AssignUIHandlePtr(holder, std::make_shared<EnvelopeHandle>(envelope));
49  result->mTimeTrack = timeTrack;
50  return result;
51 }

References AssignUIHandlePtr().

Referenced by WaveformView::DetailedHitTest(), and HitEnvelope().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HitEnvelope()

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

Definition at line 113 of file EnvelopeHandle.cpp.

118 {
119  const auto &viewInfo = ViewInfo::Get( *pProject );
120 
121  const double envValue =
122  envelope->GetValue(viewInfo.PositionToTime(state.m_x, rect.x));
123 
124  // Get y position of envelope point.
125  int yValue = GetWaveYPos(envValue,
126  zoomMin, zoomMax,
127  rect.height, dB, true, dBRange, false) + rect.y;
128 
129  // Get y position of center line
130  int ctr = GetWaveYPos(0.0,
131  zoomMin, zoomMax,
132  rect.height, dB, true, dBRange, false) + rect.y;
133 
134  // Get y distance of mouse from center line (in pixels).
135  int yMouse = abs(ctr - state.m_y);
136  // Get y distance of envelope from center line (in pixels)
137  yValue = abs(ctr - yValue);
138 
139  // JKC: It happens that the envelope is actually drawn offset from its
140  // 'true' position (it is 3 pixels wide). yMisalign is really a fudge
141  // factor to allow us to hit it exactly, but I wouldn't dream of
142  // calling it yFudgeFactor :)
143  const int yMisalign = 2;
144  // Perhaps yTolerance should be put into preferences?
145  const int yTolerance = 5; // how far from envelope we may be and count as a hit.
146  int distance;
147 
148  // For amplification using the envelope we introduced the idea of contours.
149  // The contours have the same shape as the envelope, which may be partially off-screen.
150  // The contours are closer in to the center line.
151  int ContourSpacing = (int)(rect.height / (2 * (zoomMax - zoomMin)));
152  const int MaxContours = 2;
153 
154  // Adding ContourSpacing/2 selects a region either side of the contour.
155  int yDisplace = yValue - yMisalign - yMouse + ContourSpacing / 2;
156  if (yDisplace > (MaxContours * ContourSpacing))
157  return {};
158  // Subtracting the ContourSpacing/2 we added earlier ensures distance is centred on the contour.
159  distance = abs((yDisplace % ContourSpacing) - ContourSpacing / 2);
160  if (distance >= yTolerance)
161  return {};
162 
163  return HitAnywhere(holder, envelope, timeTrack);
164 }

References ViewInfo::Get(), Envelope::GetValue(), GetWaveYPos(), and HitAnywhere().

Referenced by TimeTrackHitTest(), and WaveTrackHitTest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator=() [1/2]

EnvelopeHandle& EnvelopeHandle::operator= ( const EnvelopeHandle )
privatedelete

◆ operator=() [2/2]

EnvelopeHandle& EnvelopeHandle::operator= ( EnvelopeHandle &&  )
default

◆ Preview()

HitTestPreview EnvelopeHandle::Preview ( const TrackPanelMouseState state,
AudacityProject pProject 
)
overridevirtual

Implements UIHandle.

Definition at line 252 of file EnvelopeHandle.cpp.

254 {
255  const bool unsafe = ProjectAudioIO::Get( *pProject ).IsAudioActive();
256  static auto disabledCursor =
257  ::MakeCursor(wxCURSOR_NO_ENTRY, DisabledCursorXpm, 16, 16);
258  static auto envelopeCursor =
259  ::MakeCursor(wxCURSOR_ARROW, EnvCursorXpm, 16, 16);
260 
261  auto message = mTimeTrack
262  ? XO("Click and drag to warp playback time")
263  : XO("Click and drag to edit the amplitude envelope");
264 
265  return {
266  message,
267  (unsafe
268  ? &*disabledCursor
269  : &*envelopeCursor)
270  };
271 }

References ProjectAudioIO::Get(), ProjectAudioIO::IsAudioActive(), MakeCursor(), mTimeTrack, and XO.

Here is the call graph for this function:

◆ Release()

UIHandle::Result EnvelopeHandle::Release ( const TrackPanelMouseEvent event,
AudacityProject pProject,
wxWindow *  pParent 
)
overridevirtual

Implements UIHandle.

Definition at line 273 of file EnvelopeHandle.cpp.

276 {
277  const wxMouseEvent &event = evt.event;
278  const auto &viewInfo = ViewInfo::Get( *pProject );
279  const bool unsafe = ProjectAudioIO::Get( *pProject ).IsAudioActive();
280  if (unsafe)
281  return this->Cancel(pProject);
282 
283  const bool needUpdate = ForwardEventToEnvelopes(event, viewInfo);
284 
285  ProjectHistory::Get( *pProject ).PushState(
286  /* i18n-hint: (verb) Audacity has just adjusted the envelope .*/
287  XO("Adjusted envelope."),
288  /* i18n-hint: The envelope is a curve that controls the audio loudness.*/
289  XO("Envelope")
290  );
291 
292  mEnvelopeEditors.clear();
293 
294  using namespace RefreshCode;
295  return needUpdate ? RefreshCell : RefreshNone;
296 }

References Cancel(), TrackPanelMouseEvent::event, ForwardEventToEnvelopes(), ViewInfo::Get(), ProjectAudioIO::Get(), ProjectHistory::Get(), ProjectAudioIO::IsAudioActive(), mEnvelopeEditors, ProjectHistory::PushState(), RefreshCode::RefreshCell, RefreshCode::RefreshNone, and XO.

Here is the call graph for this function:

◆ StopsOnKeystroke()

bool EnvelopeHandle::StopsOnKeystroke ( )
inlineoverridevirtual

Reimplemented from UIHandle.

Definition at line 79 of file EnvelopeHandle.h.

79 { return true; }

◆ TimeTrackHitTest()

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

Definition at line 70 of file EnvelopeHandle.cpp.

74 {
75  auto envelope = tt->GetEnvelope();
76  if (!envelope)
77  return {};
78  bool dB;
79  double dBRange;
80  float zoomMin, zoomMax;
81  GetTimeTrackData( *pProject, *tt, dBRange, dB, zoomMin, zoomMax);
83  (holder, state, rect, pProject, envelope, zoomMin, zoomMax, dB, dBRange,
84  true);
85 }

References TimeTrack::GetEnvelope(), anonymous_namespace{EnvelopeHandle.cpp}::GetTimeTrackData(), and HitEnvelope().

Referenced by TimeTrackView::DetailedHitTest().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ WaveTrackHitTest()

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.

Definition at line 87 of file EnvelopeHandle.cpp.

91 {
94  auto &viewInfo = ViewInfo::Get(*pProject);
95  auto time = viewInfo.PositionToTime(state.m_x, rect.GetX());
96  Envelope *const envelope = wt->GetEnvelopeAtTime(time);
97 
98  if (!envelope)
99  return {};
100 
101  // Get envelope point, range 0.0 to 1.0
102  const bool dB = !wt->GetWaveformSettings().isLinear();
103 
104  float zoomMin, zoomMax;
105  wt->GetDisplayBounds(&zoomMin, &zoomMax);
106 
107  const float dBRange = wt->GetWaveformSettings().dBRange;
108 
110  (holder, state, rect, pProject, envelope, zoomMin, zoomMax, dB, dBRange, false);
111 }

References WaveformSettings::dBRange, ViewInfo::Get(), WaveTrack::GetDisplayBounds(), WaveTrack::GetEnvelopeAtTime(), WaveTrack::GetWaveformSettings(), HitEnvelope(), and WaveformSettings::isLinear().

Referenced by WaveformView::DetailedHitTest().

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ mdBRange

double EnvelopeHandle::mdBRange {}
private

Definition at line 88 of file EnvelopeHandle.h.

Referenced by Click(), and ForwardEventToEnvelopes().

◆ mEnvelope

Envelope* EnvelopeHandle::mEnvelope {}
private

Definition at line 90 of file EnvelopeHandle.h.

Referenced by Click().

◆ mEnvelopeEditors

std::vector< std::unique_ptr<EnvelopeEditor> > EnvelopeHandle::mEnvelopeEditors
private

Definition at line 91 of file EnvelopeHandle.h.

Referenced by Cancel(), Click(), ForwardEventToEnvelopes(), and Release().

◆ mLog

bool EnvelopeHandle::mLog {}
private

Definition at line 86 of file EnvelopeHandle.h.

Referenced by Click(), and ForwardEventToEnvelopes().

◆ mLower

float EnvelopeHandle::mLower {}
private

Definition at line 87 of file EnvelopeHandle.h.

Referenced by Click(), and ForwardEventToEnvelopes().

◆ mRect

wxRect EnvelopeHandle::mRect {}
private

Definition at line 85 of file EnvelopeHandle.h.

Referenced by Click(), and ForwardEventToEnvelopes().

◆ mTimeTrack

bool EnvelopeHandle::mTimeTrack {}
private

Definition at line 93 of file EnvelopeHandle.h.

Referenced by Preview().

◆ mUpper

float EnvelopeHandle::mUpper {}
private

Definition at line 87 of file EnvelopeHandle.h.

Referenced by Click(), and ForwardEventToEnvelopes().


The documentation for this class was generated from the following files:
WaveformSettings::isLinear
bool isLinear() const
Definition: WaveformSettings.h:71
ViewInfo::Get
static ViewInfo & Get(AudacityProject &project)
Definition: ViewInfo.cpp:241
WaveTrack
A Track that contains audio waveform data.
Definition: WaveTrack.h:69
TrackPanelMouseEvent::rect
const wxRect & rect
Definition: TrackPanelMouseEvent.h:59
RefreshCode::RefreshNone
@ RefreshNone
Definition: RefreshCode.h:21
TrackList::Channels
static auto Channels(TrackType *pTrack) -> TrackIterRange< TrackType >
Definition: Track.h:1484
MakeCursor
std::unique_ptr< wxCursor > MakeCursor(int WXUNUSED(CursorId), const char *const pXpm[36], int HotX, int HotY)
Definition: TrackPanel.cpp:182
Envelope
Piecewise linear or piecewise exponential function from double to double.
Definition: Envelope.h:71
EnvelopeHandle::ForwardEventToEnvelopes
bool ForwardEventToEnvelopes(const wxMouseEvent &event, const ViewInfo &viewInfo)
Definition: EnvelopeHandle.cpp:306
WaveTrack::GetEnvelopeAtTime
Envelope * GetEnvelopeAtTime(double time)
Definition: WaveTrack.cpp:2212
RefreshCode::Cancelled
@ Cancelled
Definition: RefreshCode.h:23
XO
#define XO(s)
Definition: Internat.h:31
EnvelopeHandle::mTimeTrack
bool mTimeTrack
Definition: EnvelopeHandle.h:93
EnvelopeHandle::mdBRange
double mdBRange
Definition: EnvelopeHandle.h:88
ProjectAudioIO::Get
static ProjectAudioIO & Get(AudacityProject &project)
Definition: ProjectAudioIO.cpp:22
EnvelopeHandle::mEnvelope
Envelope * mEnvelope
Definition: EnvelopeHandle.h:90
ProjectAudioIO::IsAudioActive
bool IsAudioActive() const
Definition: ProjectAudioIO.cpp:51
EnvelopeHandle::mLower
float mLower
Definition: EnvelopeHandle.h:87
UIHandle::mChangeHighlight
Result mChangeHighlight
Definition: UIHandle.h:139
TimeTrack::GetEnvelope
BoundedEnvelope * GetEnvelope()
Definition: TimeTrack.h:77
WaveTrack::GetWaveformSettings
const WaveformSettings & GetWaveformSettings() const
Definition: WaveTrack.cpp:811
RefreshCode::RefreshCell
@ RefreshCell
Definition: RefreshCode.h:24
EnvelopeHandle::mLog
bool mLog
Definition: EnvelopeHandle.h:86
EnvelopeHandle::mEnvelopeEditors
std::vector< std::unique_ptr< EnvelopeEditor > > mEnvelopeEditors
Definition: EnvelopeHandle.h:91
Envelope::GetValue
double GetValue(double t, double sampleDur=0) const
Get envelope value at time t.
Definition: Envelope.cpp:827
ProjectHistory::PushState
void PushState(const TranslatableString &desc, const TranslatableString &shortDesc)
Definition: ProjectHistory.cpp:90
Track
Abstract base class for an object holding data associated with points on a time axis.
Definition: Track.h:239
ProjectHistory::RollbackState
void RollbackState()
Definition: ProjectHistory.cpp:117
anonymous_namespace{EnvelopeHandle.cpp}::GetTimeTrackData
void GetTimeTrackData(const AudacityProject &project, const TimeTrack &tt, double &dBRange, bool &dB, float &zoomMin, float &zoomMax)
Definition: EnvelopeHandle.cpp:55
WaveformSettings::dBRange
int dBRange
Definition: WaveformSettings.h:68
GetWaveYPos
int GetWaveYPos(float value, float min, float max, int height, bool dB, bool outer, float dBr, bool clip)
Definition: TrackArtist.cpp:136
AssignUIHandlePtr
std::shared_ptr< Subclass > AssignUIHandlePtr(std::weak_ptr< Subclass > &holder, const std::shared_ptr< Subclass > &pNew)
Definition: UIHandle.h:151
WaveTrack::GetDisplayBounds
void GetDisplayBounds(float *min, float *max) const
Definition: WaveTrack.cpp:320
RefreshCode
Namespace containing an enum 'what to do on a refresh?'.
Definition: RefreshCode.h:16
EnvelopeHandle::HitEnvelope
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)
Definition: EnvelopeHandle.cpp:114
TimeTrack
A kind of Track used to 'warp time'.
Definition: TimeTrack.h:24
EnvelopeHandle::mUpper
float mUpper
Definition: EnvelopeHandle.h:87
ProjectHistory::Get
static ProjectHistory & Get(AudacityProject &project)
Definition: ProjectHistory.cpp:26
EnvelopeHandle::HitAnywhere
static UIHandlePtr HitAnywhere(std::weak_ptr< EnvelopeHandle > &holder, Envelope *envelope, bool timeTrack)
Definition: EnvelopeHandle.cpp:46
EnvelopeHandle::Cancel
Result Cancel(AudacityProject *pProject) override
Definition: EnvelopeHandle.cpp:298
EnvelopeHandle::mRect
wxRect mRect
Definition: EnvelopeHandle.h:85