Audacity 3.2.0
Functions
WaveTrackUtils Namespace Reference

Functions

bool IsClipSelected (const ViewInfo &viewInfo, const WaveClip &waveClip)
 Decide whether a clip is selected from its start and end times (only) More...
 
template<typename Iter >
Iter SelectedClip (const ViewInfo &viewInfo, Iter begin, Iter end)
 

Function Documentation

◆ IsClipSelected()

bool WaveTrackUtils::IsClipSelected ( const ViewInfo viewInfo,
const WaveClip waveClip 
)

Decide whether a clip is selected from its start and end times (only)

Definition at line 16 of file WaveTrackUtils.cpp.

17{
18 return clip.GetPlayStartTime() == viewInfo.selectedRegion.t0() &&
19 clip.GetPlayEndTime() == viewInfo.selectedRegion.t1();
20}
double t1() const
Definition: ViewInfo.h:36
double t0() const
Definition: ViewInfo.h:35
NotifyingSelectedRegion selectedRegion
Definition: ViewInfo.h:215

References WaveClip::GetPlayEndTime(), WaveClip::GetPlayStartTime(), ViewInfo::selectedRegion, NotifyingSelectedRegion::t0(), and NotifyingSelectedRegion::t1().

Referenced by SelectedClip().

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

◆ SelectedClip()

template<typename Iter >
Iter WaveTrackUtils::SelectedClip ( const ViewInfo viewInfo,
Iter  begin,
Iter  end 
)

Definition at line 26 of file WaveTrackUtils.h.

27 {
28 return std::find_if(begin, end,
29 [&](auto& pClip) { return IsClipSelected(viewInfo, *pClip); });
30 }
bool IsClipSelected(const ViewInfo &viewInfo, const WaveClip &waveClip)
Decide whether a clip is selected from its start and end times (only)
const char * end(const char *str) noexcept
Definition: StringUtils.h:106
const char * begin(const char *str) noexcept
Definition: StringUtils.h:101

References details::begin(), details::end(), and IsClipSelected().

Referenced by anonymous_namespace{WaveChannelView.cpp}::NextClipLooped().

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