Audacity  3.0.3
Classes | Public Types | Public Member Functions | Private Member Functions | Private Attributes | List of all members
LabelTrack Class Referencefinal

A LabelTrack is a Track that holds labels (LabelStruct). More...

#include <LabelTrack.h>

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

Classes

struct  IntervalData
 

Public Types

using Holder = std::shared_ptr< LabelTrack >
 
- Public Types inherited from Track
using AttachedObjects = ::AttachedTrackObjects
 Alias for my base type. More...
 
using ChannelType = XMLValueChecker::ChannelType
 
using IntervalData = TrackIntervalData
 
using Interval = TrackInterval
 
using Intervals = std::vector< Interval >
 
using ConstInterval = ConstTrackInterval
 
using ConstIntervals = std::vector< ConstInterval >
 
using Holder = std::shared_ptr< Track >
 
template<typename R = void>
using Continuation = std::function< R() >
 Type of arguments passed as optional second parameter to TypeSwitch() cases. More...
 
using Fallthrough = Continuation<>
 Type of arguments passed as optional second parameter to TypeSwitch<void>() cases. More...
 
- Public Types inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >
using DataType = ClientData
 
using DataPointer = Pointer< ClientData >
 
using DataFactory = std::function< DataPointer(Host &) >
 Type of function from which RegisteredFactory is constructed; it builds attachments. More...
 

Public Member Functions

 LabelTrack ()
 
 LabelTrack (const LabelTrack &orig)
 
virtual ~ LabelTrack ()
 
void SetLabel (size_t iLabel, const LabelStruct &newLabel)
 
void SetOffset (double dOffset) override
 
void SetSelected (bool s) override
 
double GetOffset () const override
 
double GetStartTime () const override
 
double GetEndTime () const override
 
bool HandleXMLTag (const wxChar *tag, const wxChar **attrs) override
 
XMLTagHandlerHandleXMLChild (const wxChar *tag) override
 
void WriteXML (XMLWriter &xmlFile) const override
 
Track::Holder Cut (double t0, double t1) override
 
Track::Holder Copy (double t0, double t1, bool forClipboard=true) const override
 
void Clear (double t0, double t1) override
 
void Paste (double t, const Track *src) override
 
bool Repeat (double t0, double t1, int n)
 
void SyncLockAdjust (double oldT1, double newT1) override
 
void Silence (double t0, double t1) override
 
void InsertSilence (double t, double len) override
 
void Import (wxTextFile &f)
 Import labels, handling files with or without end-times. More...
 
void Export (wxTextFile &f) const
 Export labels including label start and end-times. More...
 
int GetNumLabels () const
 
const LabelStructGetLabel (int index) const
 
const LabelArrayGetLabels () const
 
void OnLabelAdded (const wxString &title, int pos)
 
int AddLabel (const SelectedRegion &region, const wxString &title)
 
void DeleteLabel (int index)
 
bool PasteOver (double t, const Track *src)
 
void ShiftLabelsOnInsert (double length, double pt)
 
void ChangeLabelsOnReverse (double b, double e)
 
void ScaleLabels (double b, double e, double change)
 
double AdjustTimeStampOnScale (double t, double b, double e, double change)
 
void WarpLabels (const TimeWarper &warper)
 
wxString GetTextOfLabels (double t0, double t1) const
 
int FindNextLabel (const SelectedRegion &currentSelection)
 
int FindPrevLabel (const SelectedRegion &currentSelection)
 
Track::Holder PasteInto (AudacityProject &) const override
 Find or create the destination track for a paste, maybe in a different project. More...
 
ConstInterval MakeInterval (size_t index) const
 
Interval MakeInterval (size_t index)
 
ConstIntervals GetIntervals () const override
 Report times on the track where important intervals begin and end, for UI to snap to. More...
 
Intervals GetIntervals () override
 
void SortLabels ()
 
- Public Member Functions inherited from Track
TrackId GetId () const
 
template<typename Subclass = Track>
std::shared_ptr< Subclass > SharedPointer ()
 
template<typename Subclass = const Track>
auto SharedPointer () const -> typename std::enable_if< std::is_const< Subclass >::value, std::shared_ptr< Subclass > >::type
 
std::shared_ptr< TrackSubstitutePendingChangedTrack ()
 
std::shared_ptr< const TrackSubstitutePendingChangedTrack () const
 
std::shared_ptr< const TrackSubstituteOriginalTrack () const
 
virtual bool SupportsBasicEditing () const
 Whether this track type implements cut-copy-paste; by default, true. More...
 
const std::shared_ptr< CommonTrackCell > & GetTrackView ()
 
void SetTrackView (const std::shared_ptr< CommonTrackCell > &pView)
 
const std::shared_ptr< CommonTrackCell > & GetTrackControls ()
 
void SetTrackControls (const std::shared_ptr< CommonTrackCell > &pControls)
 
int GetIndex () const
 
void SetIndex (int index)
 
bool LinkConsistencyCheck ()
 
bool HasOwner () const
 
std::shared_ptr< TrackListGetOwner () const
 
 Track ()
 
 Track (const Track &orig)
 
virtual ~ Track ()
 
void Init (const Track &orig)
 
virtual Holder Duplicate () const
 
virtual void Merge (const Track &orig)
 
wxString GetName () const
 
void SetName (const wxString &n)
 
wxString GetDefaultName () const
 
void SetDefaultName (const wxString &n)
 
bool GetSelected () const
 
void EnsureVisible (bool modifyState=false)
 
virtual ChannelType GetChannel () const
 
void Offset (double t)
 
virtual void SetPan (float)
 
virtual void SetPanFromChannelType ()
 
virtual Holder Cut (double WXUNUSED(t0), double WXUNUSED(t1))=0
 
virtual Holder Copy (double WXUNUSED(t0), double WXUNUSED(t1), bool forClipboard=true) const =0
 
virtual void Clear (double WXUNUSED(t0), double WXUNUSED(t1))=0
 
virtual void Paste (double WXUNUSED(t), const Track *WXUNUSED(src))=0
 
virtual void Silence (double WXUNUSED(t0), double WXUNUSED(t1))=0
 
virtual void InsertSilence (double WXUNUSED(t), double WXUNUSED(len))=0
 
bool SameKindAs (const Track &track) const
 
template<typename R = void, typename ... Functions>
TypeSwitch (const Functions &...functions)
 Use this function rather than testing track type explicitly and making down-casts. More...
 
template<typename R = void, typename ... Functions>
TypeSwitch (const Functions &...functions) const
 Use this function rather than testing track type explicitly and making down-casts. More...
 
virtual bool GetErrorOpening ()
 
bool IsSyncLockSelected () const
 
void Notify (int code=-1)
 
bool Any () const
 
bool IsSelected () const
 
bool IsSelectedOrSyncLockSelected () const
 
bool IsLeader () const
 
bool IsSelectedLeader () const
 
void AdjustPositions ()
 
void WriteCommonXMLAttributes (XMLWriter &xmlFile, bool includeNameAndSelected=true) const
 
bool HandleCommonXMLAttribute (const wxChar *attr, const wxChar *value)
 
- Public Member Functions inherited from XMLTagHandler
 XMLTagHandler ()
 
virtual ~XMLTagHandler ()
 
virtual void HandleXMLEndTag (const wxChar *WXUNUSED(tag))
 
virtual void HandleXMLContent (const wxString &WXUNUSED(content))
 
bool ReadXMLTag (const char *tag, const char **attrs)
 
void ReadXMLEndTag (const char *tag)
 
void ReadXMLContent (const char *s, int len)
 
XMLTagHandlerReadXMLChild (const char *tag)
 
- Public Member Functions inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >
 ~Site ()
 
 Site ()
 
 Site (const Site &other)
 
Siteoperator= (const Site &other)
 
 Site (Site &&other)
 
Siteoperator= (Site &&other)
 
size_t size () const
 How many attachment pointers are in the Site. More...
 
template<typename Subclass = ClientData>
Subclass & Get (const RegisteredFactory &key)
 Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More...
 
template<typename Subclass = const ClientData>
auto Get (const RegisteredFactory &key) const -> typename std::enable_if< std::is_const< Subclass >::value, Subclass & >::type
 Get reference to an attachment, creating on demand if not present, down-cast it to Subclass. More...
 
template<typename Subclass = ClientData>
Subclass * Find (const RegisteredFactory &key)
 Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand. More...
 
template<typename Subclass = const ClientData>
auto Find (const RegisteredFactory &key) const -> typename std::enable_if< std::is_const< Subclass >::value, Subclass * >::type
 Get a (bare) pointer to an attachment, or null, down-cast it to Subclass *; will not create on demand. More...
 
template<typename ReplacementPointer >
void Assign (const RegisteredFactory &key, ReplacementPointer &&replacement)
 Reassign Site's pointer to ClientData. More...
 

Private Member Functions

Track::Holder Clone () const override
 
TrackKind GetKind () const override
 

Private Attributes

LabelArray mLabels
 
double mClipLen
 
int miLastLabel
 

Additional Inherited Members

- Static Public Member Functions inherited from Track
template<typename Subclass = Track>
static std::shared_ptr< Subclass > SharedPointer (Track *pTrack)
 
template<typename Subclass = const Track>
static std::shared_ptr< Subclass > SharedPointer (const Track *pTrack)
 
static void FinishCopy (const Track *n, Track *dest)
 
- Static Public Member Functions inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >
static size_t slots ()
 How many static factories have been registered with this specialization of Site. More...
 
- Public Attributes inherited from Track
wxSize vrulerSize
 
- Static Public Attributes inherited from Track
static const auto LeftChannel = XMLValueChecker::LeftChannel
 
static const auto RightChannel = XMLValueChecker::RightChannel
 
static const auto MonoChannel = XMLValueChecker::MonoChannel
 
- Protected Member Functions inherited from ClientData::Site< Host, ClientData, ObjectCopyingPolicy, Pointer, ObjectLockingPolicy, RegistryLockingPolicy >
template<typename Function >
void ForEach (const Function &function)
 Invoke function on each ClientData object that has been created in this. More...
 
template<typename Function >
void ForEach (const Function &function) const
 Invoke function on each ClientData object that has been created in this. More...
 
template<typename Function >
ClientData * FindIf (const Function &function)
 Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More...
 
template<typename Function >
const ClientData * FindIf (const Function &function) const
 Return pointer to first attachment in this that is not null and satisfies a predicate, or nullptr. More...
 
void BuildAll ()
 For each RegisteredFactory, if the corresponding attachment is absent in this, build and store it. More...
 
- Protected Attributes inherited from Track
std::weak_ptr< TrackListmList
 
TrackNodePointer mNode {}
 Holds iterator to self, so that TrackList::Find can be constant-time. More...
 
int mIndex
 0-based position of this track in its TrackList More...
 
wxString mName
 
wxString mDefaultName
 
bool mLinked
 
ChannelType mChannel
 
double mOffset
 
std::shared_ptr< CommonTrackCellmpView
 
std::shared_ptr< CommonTrackCellmpControls
 

Detailed Description

A LabelTrack is a Track that holds labels (LabelStruct).

These are used to annotate a waveform. Each label has a start time and an end time. The text of the labels is editable and the positions of the end points are draggable.

Definition at line 85 of file LabelTrack.h.

Member Typedef Documentation

◆ Holder

using LabelTrack::Holder = std::shared_ptr<LabelTrack>

Definition at line 105 of file LabelTrack.h.

Constructor & Destructor Documentation

◆ LabelTrack() [1/2]

LabelTrack::LabelTrack ( )

Definition at line 69 of file LabelTrack.cpp.

69  :
70  Track(),
71  mClipLen(0.0),
72  miLastLabel(-1)
73 {
74  SetDefaultName(_("Label Track"));
76 }

References _, Track::GetDefaultName(), Track::SetDefaultName(), and Track::SetName().

Here is the call graph for this function:

◆ LabelTrack() [2/2]

LabelTrack::LabelTrack ( const LabelTrack orig)

Definition at line 78 of file LabelTrack.cpp.

78  :
79  Track(orig),
80  mClipLen(0.0)
81 {
82  for (auto &original: orig.mLabels) {
83  LabelStruct l { original.selectedRegion, original.title };
84  mLabels.push_back(l);
85  }
86 }

References mLabels, and LabelStruct::selectedRegion.

◆ ~ LabelTrack()

virtual LabelTrack::~ LabelTrack ( )
virtual

Member Function Documentation

◆ AddLabel()

int LabelTrack::AddLabel ( const SelectedRegion region,
const wxString &  title 
)

Definition at line 930 of file LabelTrack.cpp.

932 {
933  LabelStruct l { selectedRegion, title };
934 
935  int len = mLabels.size();
936  int pos = 0;
937 
938  while (pos < len && mLabels[pos].getT0() < selectedRegion.t0())
939  pos++;
940 
941  mLabels.insert(mLabels.begin() + pos, l);
942 
943  LabelTrackEvent evt{
944  EVT_LABELTRACK_ADDITION, SharedPointer<LabelTrack>(), title, -1, pos
945  };
946  ProcessEvent( evt );
947 
948  return pos;
949 }

References mLabels, and SelectedRegion::t0().

Referenced by VampEffect::AddFeatures(), and EffectFindClipping::ProcessOne().

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

◆ AdjustTimeStampOnScale()

double LabelTrack::AdjustTimeStampOnScale ( double  t,
double  b,
double  e,
double  change 
)

Definition at line 237 of file LabelTrack.cpp.

238 {
239 //t is the time stamp we'll be changing
240 //b and e are the selection start and end
241 
242  if (t < b){
243  return t;
244  }else if (t > e){
245  double shift = (e-b)*change - (e-b);
246  return t + shift;
247  }else{
248  double shift = (t-b)*change - (t-b);
249  return t + shift;
250  }
251 }

Referenced by ScaleLabels().

Here is the caller graph for this function:

◆ ChangeLabelsOnReverse()

void LabelTrack::ChangeLabelsOnReverse ( double  b,
double  e 
)

Definition at line 213 of file LabelTrack.cpp.

214 {
215  for (auto &labelStruct: mLabels) {
216  if (labelStruct.RegionRelation(b, e, this) ==
218  {
219  double aux = b + (e - labelStruct.getT1());
220  labelStruct.selectedRegion.setTimes(
221  aux,
222  e - (labelStruct.getT0() - b));
223  }
224  }
225  SortLabels();
226 }

References mLabels, SortLabels(), and LabelStruct::SURROUNDS_LABEL.

Here is the call graph for this function:

◆ Clear()

void LabelTrack::Clear ( double  t0,
double  t1 
)
override

Definition at line 151 of file LabelTrack.cpp.

152 {
153  // May DELETE labels, so use subscripts to iterate
154  for (size_t i = 0; i < mLabels.size(); ++i) {
155  auto &labelStruct = mLabels[i];
156  LabelStruct::TimeRelations relation =
157  labelStruct.RegionRelation(b, e, this);
158  if (relation == LabelStruct::BEFORE_LABEL)
159  labelStruct.selectedRegion.move(- (e-b));
160  else if (relation == LabelStruct::SURROUNDS_LABEL) {
161  DeleteLabel( i );
162  --i;
163  }
164  else if (relation == LabelStruct::ENDS_IN_LABEL)
165  labelStruct.selectedRegion.setTimes(
166  b,
167  labelStruct.getT1() - (e - b));
168  else if (relation == LabelStruct::BEGINS_IN_LABEL)
169  labelStruct.selectedRegion.setT1(b);
170  else if (relation == LabelStruct::WITHIN_LABEL)
171  labelStruct.selectedRegion.moveT1( - (e-b));
172  }
173 }

References LabelStruct::BEFORE_LABEL, LabelStruct::BEGINS_IN_LABEL, DeleteLabel(), LabelStruct::ENDS_IN_LABEL, mLabels, LabelStruct::SURROUNDS_LABEL, and LabelStruct::WITHIN_LABEL.

Referenced by Cut(), EditActions::Handler::OnPaste(), and SyncLockAdjust().

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

◆ Clone()

Track::Holder LabelTrack::Clone ( ) const
overrideprivatevirtual

Implements Track.

Definition at line 339 of file LabelTrack.cpp.

340 {
341  return std::make_shared<LabelTrack>( *this );
342 }

◆ Copy()

Track::Holder LabelTrack::Copy ( double  t0,
double  t1,
bool  forClipboard = true 
) const
override

Definition at line 693 of file LabelTrack.cpp.

694 {
695  auto tmp = std::make_shared<LabelTrack>();
696  const auto lt = static_cast<LabelTrack*>(tmp.get());
697 
698  for (auto &labelStruct: mLabels) {
699  LabelStruct::TimeRelations relation =
700  labelStruct.RegionRelation(t0, t1, this);
701  if (relation == LabelStruct::SURROUNDS_LABEL) {
702  LabelStruct l {
703  labelStruct.selectedRegion,
704  labelStruct.getT0() - t0,
705  labelStruct.getT1() - t0,
706  labelStruct.title
707  };
708  lt->mLabels.push_back(l);
709  }
710  else if (relation == LabelStruct::WITHIN_LABEL) {
711  LabelStruct l {
712  labelStruct.selectedRegion,
713  0,
714  t1-t0,
715  labelStruct.title
716  };
717  lt->mLabels.push_back(l);
718  }
719  else if (relation == LabelStruct::BEGINS_IN_LABEL) {
720  LabelStruct l {
721  labelStruct.selectedRegion,
722  0,
723  labelStruct.getT1() - t0,
724  labelStruct.title
725  };
726  lt->mLabels.push_back(l);
727  }
728  else if (relation == LabelStruct::ENDS_IN_LABEL) {
729  LabelStruct l {
730  labelStruct.selectedRegion,
731  labelStruct.getT0() - t0,
732  t1 - t0,
733  labelStruct.title
734  };
735  lt->mLabels.push_back(l);
736  }
737  }
738  lt->mClipLen = (t1 - t0);
739 
740  return tmp;
741 }

References LabelStruct::BEGINS_IN_LABEL, LabelStruct::ENDS_IN_LABEL, mLabels, LabelStruct::selectedRegion, LabelStruct::SURROUNDS_LABEL, and LabelStruct::WITHIN_LABEL.

Referenced by Cut(), and Effect::ModifiedAnalysisTrack::ModifiedAnalysisTrack().

Here is the caller graph for this function:

◆ Cut()

Track::Holder LabelTrack::Cut ( double  t0,
double  t1 
)
override

Definition at line 670 of file LabelTrack.cpp.

671 {
672  auto tmp = Copy(t0, t1);
673 
674  Clear(t0, t1);
675 
676  return tmp;
677 }

References Clear(), and Copy().

Here is the call graph for this function:

◆ DeleteLabel()

void LabelTrack::DeleteLabel ( int  index)

Definition at line 951 of file LabelTrack.cpp.

952 {
953  wxASSERT((index < (int)mLabels.size()));
954  auto iter = mLabels.begin() + index;
955  const auto title = iter->title;
956  mLabels.erase(iter);
957 
958  LabelTrackEvent evt{
959  EVT_LABELTRACK_DELETION, SharedPointer<LabelTrack>(), title, index, -1
960  };
961  ProcessEvent( evt );
962 }

References mLabels.

Referenced by Clear(), and Silence().

Here is the caller graph for this function:

◆ Export()

void LabelTrack::Export ( wxTextFile &  f) const

Export labels including label start and end-times.

Definition at line 536 of file LabelTrack.cpp.

537 {
538  // PRL: to do: export other selection fields
539  for (auto &labelStruct: mLabels)
540  labelStruct.Export(f);
541 }

References mLabels.

◆ FindNextLabel()

int LabelTrack::FindNextLabel ( const SelectedRegion currentSelection)

Definition at line 1022 of file LabelTrack.cpp.

1023 {
1024  int i = -1;
1025 
1026  if (!mLabels.empty()) {
1027  int len = (int) mLabels.size();
1028  if (miLastLabel >= 0 && miLastLabel + 1 < len
1029  && currentRegion.t0() == mLabels[miLastLabel].getT0()
1030  && currentRegion.t0() == mLabels[miLastLabel + 1].getT0() ) {
1031  i = miLastLabel + 1;
1032  }
1033  else {
1034  i = 0;
1035  if (currentRegion.t0() < mLabels[len - 1].getT0()) {
1036  while (i < len &&
1037  mLabels[i].getT0() <= currentRegion.t0()) {
1038  i++;
1039  }
1040  }
1041  }
1042  }
1043 
1044  miLastLabel = i;
1045  return i;
1046 }

References miLastLabel, mLabels, and SelectedRegion::t0().

Referenced by anonymous_namespace{TransportMenus.cpp}::DoMoveToLabel().

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

◆ FindPrevLabel()

int LabelTrack::FindPrevLabel ( const SelectedRegion currentSelection)

Definition at line 1048 of file LabelTrack.cpp.

1049 {
1050  int i = -1;
1051 
1052  if (!mLabels.empty()) {
1053  int len = (int) mLabels.size();
1054  if (miLastLabel > 0 && miLastLabel < len
1055  && currentRegion.t0() == mLabels[miLastLabel].getT0()
1056  && currentRegion.t0() == mLabels[miLastLabel - 1].getT0() ) {
1057  i = miLastLabel - 1;
1058  }
1059  else {
1060  i = len - 1;
1061  if (currentRegion.t0() > mLabels[0].getT0()) {
1062  while (i >=0 &&
1063  mLabels[i].getT0() >= currentRegion.t0()) {
1064  i--;
1065  }
1066  }
1067  }
1068  }
1069 
1070  miLastLabel = i;
1071  return i;
1072 }

References miLastLabel, mLabels, and SelectedRegion::t0().

Referenced by anonymous_namespace{TransportMenus.cpp}::DoMoveToLabel().

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

◆ GetEndTime()

double LabelTrack::GetEndTime ( ) const
overridevirtual

Implements Track.

Definition at line 323 of file LabelTrack.cpp.

324 {
325  //we need to scan through all the labels, because the last
326  //label might not have the right-most end (if there is overlap).
327  if (mLabels.empty())
328  return 0.0;
329 
330  double end = 0.0;
331  for (auto &labelStruct: mLabels) {
332  const double t1 = labelStruct.getT1();
333  if(t1 > end)
334  end = t1;
335  }
336  return end;
337 }

References mLabels.

Referenced by Effect::ModifiedAnalysisTrack::ModifiedAnalysisTrack(), and SyncLockAdjust().

Here is the caller graph for this function:

◆ GetIntervals() [1/2]

auto LabelTrack::GetIntervals ( ) const
overridevirtual

Report times on the track where important intervals begin and end, for UI to snap to.

Some intervals may be empty, and no ordering of the intervals is assumed.

Reimplemented from Track.

Definition at line 122 of file LabelTrack.cpp.

123 {
124  return DoMakeIntervals<ConstIntervals>(*this);
125 }

◆ GetIntervals() [2/2]

auto LabelTrack::GetIntervals ( )
overridevirtual

This overload exposes the extra data of the intervals as non-const This overload exposes the extra data of the intervals as non-const

Reimplemented from Track.

Definition at line 127 of file LabelTrack.cpp.

128 {
129  return DoMakeIntervals<Intervals>(*this);
130 }

◆ GetKind()

TrackKind LabelTrack::GetKind ( ) const
inlineoverrideprivatevirtual

Reimplemented from Track.

Definition at line 173 of file LabelTrack.h.

173 { return TrackKind::Label; }

References Label.

◆ GetLabel()

const LabelStruct * LabelTrack::GetLabel ( int  index) const

Definition at line 925 of file LabelTrack.cpp.

926 {
927  return &mLabels[index];
928 }

References mLabels.

Referenced by LyricsPanel::AddLabels(), LabelDialog::AddLabels(), anonymous_namespace{TransportMenus.cpp}::DoMoveToLabel(), and ExportMultipleDialog::ExportMultipleByLabel().

Here is the caller graph for this function:

◆ GetLabels()

const LabelArray& LabelTrack::GetLabels ( ) const
inline

Definition at line 130 of file LabelTrack.h.

130 { return mLabels; }

Referenced by LabelTrackView::OverATextBox(), LabelTrackView::OverGlyph(), and GetInfoCommand::SendLabels().

Here is the caller graph for this function:

◆ GetNumLabels()

int LabelTrack::GetNumLabels ( ) const

Definition at line 920 of file LabelTrack.cpp.

921 {
922  return mLabels.size();
923 }

References mLabels.

Referenced by LyricsPanel::AddLabels(), LabelDialog::AddLabels(), ExportMultipleDialog::CountTracksAndLabels(), DoMakeIntervals(), and anonymous_namespace{TransportMenus.cpp}::DoMoveToLabel().

Here is the caller graph for this function:

◆ GetOffset()

double LabelTrack::GetOffset ( ) const
overridevirtual

Implements Track.

Definition at line 310 of file LabelTrack.cpp.

311 {
312  return mOffset;
313 }

References Track::mOffset.

◆ GetStartTime()

double LabelTrack::GetStartTime ( ) const
overridevirtual

Implements Track.

Definition at line 315 of file LabelTrack.cpp.

316 {
317  if (mLabels.empty())
318  return 0.0;
319  else
320  return mLabels[0].getT0();
321 }

References mLabels.

Referenced by Effect::ModifiedAnalysisTrack::ModifiedAnalysisTrack(), and EffectFindClipping::Process().

Here is the caller graph for this function:

◆ GetTextOfLabels()

wxString LabelTrack::GetTextOfLabels ( double  t0,
double  t1 
) const

Definition at line 1003 of file LabelTrack.cpp.

1004 {
1005  bool firstLabel = true;
1006  wxString retVal;
1007 
1008  for (auto &labelStruct: mLabels) {
1009  if (labelStruct.getT0() >= t0 &&
1010  labelStruct.getT1() <= t1)
1011  {
1012  if (!firstLabel)
1013  retVal += '\t';
1014  firstLabel = false;
1015  retVal += labelStruct.title;
1016  }
1017  }
1018 
1019  return retVal;
1020 }

References mLabels.

◆ HandleXMLChild()

XMLTagHandler * LabelTrack::HandleXMLChild ( const wxChar *  tag)
overridevirtual

Implements XMLTagHandler.

Definition at line 641 of file LabelTrack.cpp.

642 {
643  if (!wxStrcmp(tag, wxT("label")))
644  return this;
645  else
646  return NULL;
647 }

◆ HandleXMLTag()

bool LabelTrack::HandleXMLTag ( const wxChar *  tag,
const wxChar **  attrs 
)
overridevirtual

Implements XMLTagHandler.

Definition at line 568 of file LabelTrack.cpp.

569 {
570  if (!wxStrcmp(tag, wxT("label"))) {
571 
572  SelectedRegion selectedRegion;
573  wxString title;
574 
575  // loop through attrs, which is a null-terminated list of
576  // attribute-value pairs
577  while(*attrs) {
578  const wxChar *attr = *attrs++;
579  const wxChar *value = *attrs++;
580 
581  if (!value)
582  break;
583 
584  const wxString strValue = value;
585  // Bug 1905 was about long label strings.
586  if (!XMLValueChecker::IsGoodLongString(strValue))
587  {
588  return false;
589  }
590 
591  if (selectedRegion.HandleXMLAttribute(attr, value, wxT("t"), wxT("t1")))
592  ;
593  else if (!wxStrcmp(attr, wxT("title")))
594  title = strValue;
595 
596  } // while
597 
598  // Handle files created by Audacity 1.1. Labels in Audacity 1.1
599  // did not have separate start- and end-times.
600  // PRL: this superfluous now, given class SelectedRegion's internal
601  // consistency guarantees
602  //if (selectedRegion.t1() < 0)
603  // selectedRegion.collapseToT0();
604 
605  LabelStruct l { selectedRegion, title };
606  mLabels.push_back(l);
607 
608  return true;
609  }
610  else if (!wxStrcmp(tag, wxT("labeltrack"))) {
611  long nValue = -1;
612  while (*attrs) {
613  const wxChar *attr = *attrs++;
614  const wxChar *value = *attrs++;
615 
616  if (!value)
617  return true;
618 
619  const wxString strValue = value;
620  if (this->Track::HandleCommonXMLAttribute(attr, strValue))
621  ;
622  else if (!wxStrcmp(attr, wxT("numlabels")) &&
623  XMLValueChecker::IsGoodInt(strValue) && strValue.ToLong(&nValue))
624  {
625  if (nValue < 0)
626  {
627  wxLogWarning(wxT("Project shows negative number of labels: %d"), nValue);
628  return false;
629  }
630  mLabels.clear();
631  mLabels.reserve(nValue);
632  }
633  }
634 
635  return true;
636  }
637 
638  return false;
639 }

References Track::HandleCommonXMLAttribute(), SelectedRegion::HandleXMLAttribute(), XMLValueChecker::IsGoodInt(), XMLValueChecker::IsGoodLongString(), and mLabels.

Here is the call graph for this function:

◆ Import()

void LabelTrack::Import ( wxTextFile &  f)

Import labels, handling files with or without end-times.

Definition at line 544 of file LabelTrack.cpp.

545 {
546  int lines = in.GetLineCount();
547 
548  mLabels.clear();
549  mLabels.reserve(lines);
550 
551  //Currently, we expect a tag file to have two values and a label
552  //on each line. If the second token is not a number, we treat
553  //it as a single-value label.
554  bool error = false;
555  for (int index = 0; index < lines;) {
556  try {
557  // Let LabelStruct::Import advance index
558  LabelStruct l { LabelStruct::Import(in, index) };
559  mLabels.push_back(l);
560  }
561  catch(const LabelStruct::BadFormatException&) { error = true; }
562  }
563  if (error)
564  ::AudacityMessageBox( XO("One or more saved labels could not be read.") );
565  SortLabels();
566 }

References AudacityMessageBox(), LabelStruct::Import(), mLabels, SortLabels(), and XO.

Here is the call graph for this function:

◆ InsertSilence()

void LabelTrack::InsertSilence ( double  t,
double  len 
)
override

Definition at line 906 of file LabelTrack.cpp.

907 {
908  for (auto &labelStruct: mLabels) {
909  double t0 = labelStruct.getT0();
910  double t1 = labelStruct.getT1();
911  if (t0 >= t)
912  t0 += len;
913 
914  if (t1 >= t)
915  t1 += len;
916  labelStruct.selectedRegion.setTimes(t0, t1);
917  }
918 }

References mLabels.

◆ MakeInterval() [1/2]

auto LabelTrack::MakeInterval ( size_t  index)

Definition at line 108 of file LabelTrack.cpp.

109 {
110  return DoMakeInterval<Interval>(mLabels[index], index);
111 }

◆ MakeInterval() [2/2]

auto LabelTrack::MakeInterval ( size_t  index) const

Definition at line 103 of file LabelTrack.cpp.

104 {
105  return DoMakeInterval<ConstInterval>(mLabels[index], index);
106 }

Referenced by DoMakeIntervals().

Here is the caller graph for this function:

◆ OnLabelAdded()

void LabelTrack::OnLabelAdded ( const wxString &  title,
int  pos 
)

◆ Paste()

void LabelTrack::Paste ( double  t,
const Track src 
)
override

Definition at line 773 of file LabelTrack.cpp.

774 {
775  bool bOk = src->TypeSwitch< bool >( [&](const LabelTrack *lt) {
776  double shiftAmt = lt->mClipLen > 0.0 ? lt->mClipLen : lt->GetEndTime();
777 
778  ShiftLabelsOnInsert(shiftAmt, t);
779  PasteOver(t, src);
780 
781  return true;
782  } );
783 
784  if ( !bOk )
785  // THROW_INCONSISTENCY_EXCEPTION; // ?
786  (void)0;// intentionally do nothing
787 }

References PasteOver(), ShiftLabelsOnInsert(), and Track::TypeSwitch().

Here is the call graph for this function:

◆ PasteInto()

Track::Holder LabelTrack::PasteInto ( AudacityProject ) const
overridevirtual

Find or create the destination track for a paste, maybe in a different project.

Returns
A smart pointer to the track; its use_count() can tell whether it is new

Implements Track.

Definition at line 88 of file LabelTrack.cpp.

89 {
90  auto pNewTrack = std::make_shared<LabelTrack>();
91  pNewTrack->Paste(0.0, this);
92  return pNewTrack;
93 }

◆ PasteOver()

bool LabelTrack::PasteOver ( double  t,
const Track src 
)

Definition at line 744 of file LabelTrack.cpp.

745 {
746  auto result = src->TypeSwitch< bool >( [&](const LabelTrack *sl) {
747  int len = mLabels.size();
748  int pos = 0;
749 
750  while (pos < len && mLabels[pos].getT0() < t)
751  pos++;
752 
753  for (auto &labelStruct: sl->mLabels) {
754  LabelStruct l {
755  labelStruct.selectedRegion,
756  labelStruct.getT0() + t,
757  labelStruct.getT1() + t,
758  labelStruct.title
759  };
760  mLabels.insert(mLabels.begin() + pos++, l);
761  }
762 
763  return true;
764  } );
765 
766  if (! result )
767  // THROW_INCONSISTENCY_EXCEPTION; // ?
768  (void)0;// intentionally do nothing
769 
770  return result;
771 }

References mLabels, LabelStruct::selectedRegion, and Track::TypeSwitch().

Referenced by Paste().

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

◆ Repeat()

bool LabelTrack::Repeat ( double  t0,
double  t1,
int  n 
)

Definition at line 790 of file LabelTrack.cpp.

791 {
792  // Sanity-check the arguments
793  if (n < 0 || t1 < t0)
794  return false;
795 
796  double tLen = t1 - t0;
797 
798  // Insert space for the repetitions
799  ShiftLabelsOnInsert(tLen * n, t1);
800 
801  // mLabels may resize as we iterate, so use subscripting
802  for (unsigned int i = 0; i < mLabels.size(); ++i)
803  {
804  LabelStruct::TimeRelations relation =
805  mLabels[i].RegionRelation(t0, t1, this);
806  if (relation == LabelStruct::SURROUNDS_LABEL)
807  {
808  // Label is completely inside the selection; duplicate it in each
809  // repeat interval
810  unsigned int pos = i; // running label insertion position in mLabels
811 
812  for (int j = 1; j <= n; j++)
813  {
814  const LabelStruct &label = mLabels[i];
815  LabelStruct l {
816  label.selectedRegion,
817  label.getT0() + j * tLen,
818  label.getT1() + j * tLen,
819  label.title
820  };
821 
822  // Figure out where to insert
823  while (pos < mLabels.size() &&
824  mLabels[pos].getT0() < l.getT0())
825  pos++;
826  mLabels.insert(mLabels.begin() + pos, l);
827  }
828  }
829  else if (relation == LabelStruct::BEGINS_IN_LABEL)
830  {
831  // Label ends inside the selection; ShiftLabelsOnInsert() hasn't touched
832  // it, and we need to extend it through to the last repeat interval
833  mLabels[i].selectedRegion.moveT1(n * tLen);
834  }
835 
836  // Other cases have already been handled by ShiftLabelsOnInsert()
837  }
838 
839  return true;
840 }

References LabelStruct::BEGINS_IN_LABEL, label, mLabels, ShiftLabelsOnInsert(), and LabelStruct::SURROUNDS_LABEL.

Here is the call graph for this function:

◆ ScaleLabels()

void LabelTrack::ScaleLabels ( double  b,
double  e,
double  change 
)

Definition at line 228 of file LabelTrack.cpp.

229 {
230  for (auto &labelStruct: mLabels) {
231  labelStruct.selectedRegion.setTimes(
232  AdjustTimeStampOnScale(labelStruct.getT0(), b, e, change),
233  AdjustTimeStampOnScale(labelStruct.getT1(), b, e, change));
234  }
235 }

References AdjustTimeStampOnScale(), and mLabels.

Here is the call graph for this function:

◆ SetLabel()

void LabelTrack::SetLabel ( size_t  iLabel,
const LabelStruct newLabel 
)

Definition at line 132 of file LabelTrack.cpp.

133 {
134  if( iLabel >= mLabels.size() ) {
135  wxASSERT( false );
136  mLabels.resize( iLabel + 1 );
137  }
138  mLabels[ iLabel ] = newLabel;
139 }

References mLabels.

◆ SetOffset()

void LabelTrack::SetOffset ( double  dOffset)
overridevirtual

Reimplemented from Track.

Definition at line 145 of file LabelTrack.cpp.

146 {
147  for (auto &labelStruct: mLabels)
148  labelStruct.selectedRegion.move(dOffset);
149 }

References mLabels.

Referenced by Effect::ModifiedAnalysisTrack::ModifiedAnalysisTrack().

Here is the caller graph for this function:

◆ SetSelected()

void LabelTrack::SetSelected ( bool  s)
overridevirtual

Reimplemented from Track.

Definition at line 298 of file LabelTrack.cpp.

299 {
300  bool selected = GetSelected();
301  Track::SetSelected( s );
302  if ( selected != GetSelected() ) {
303  LabelTrackEvent evt{
304  EVT_LABELTRACK_SELECTION, SharedPointer<LabelTrack>(), {}, -1, -1
305  };
306  ProcessEvent( evt );
307  }
308 }

References Track::GetSelected(), and Track::SetSelected().

Referenced by anonymous_namespace{LabelMenus.cpp}::DoAddLabel().

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

◆ ShiftLabelsOnInsert()

void LabelTrack::ShiftLabelsOnInsert ( double  length,
double  pt 
)

Definition at line 200 of file LabelTrack.cpp.

201 {
202  for (auto &labelStruct: mLabels) {
203  LabelStruct::TimeRelations relation =
204  labelStruct.RegionRelation(pt, pt, this);
205 
206  if (relation == LabelStruct::BEFORE_LABEL)
207  labelStruct.selectedRegion.move(length);
208  else if (relation == LabelStruct::WITHIN_LABEL)
209  labelStruct.selectedRegion.moveT1(length);
210  }
211 }

References LabelStruct::BEFORE_LABEL, mLabels, and LabelStruct::WITHIN_LABEL.

Referenced by EditActions::Handler::OnPaste(), Paste(), Repeat(), and SyncLockAdjust().

Here is the caller graph for this function:

◆ Silence()

void LabelTrack::Silence ( double  t0,
double  t1 
)
override

Definition at line 860 of file LabelTrack.cpp.

861 {
862  int len = mLabels.size();
863 
864  // mLabels may resize as we iterate, so use subscripting
865  for (int i = 0; i < len; ++i) {
866  LabelStruct::TimeRelations relation =
867  mLabels[i].RegionRelation(t0, t1, this);
868  if (relation == LabelStruct::WITHIN_LABEL)
869  {
870  // Split label around the selection
871  const LabelStruct &label = mLabels[i];
872  LabelStruct l {
873  label.selectedRegion,
874  t1,
875  label.getT1(),
876  label.title
877  };
878 
879  mLabels[i].selectedRegion.setT1(t0);
880 
881  // This might not be the right place to insert, but we sort at the end
882  ++i;
883  mLabels.insert(mLabels.begin() + i, l);
884  }
885  else if (relation == LabelStruct::ENDS_IN_LABEL)
886  {
887  // Beginning of label to selection end
888  mLabels[i].selectedRegion.setT0(t1);
889  }
890  else if (relation == LabelStruct::BEGINS_IN_LABEL)
891  {
892  // End of label to selection beginning
893  mLabels[i].selectedRegion.setT1(t0);
894  }
895  else if (relation == LabelStruct::SURROUNDS_LABEL)
896  {
897  DeleteLabel( i );
898  len--;
899  i--;
900  }
901  }
902 
903  SortLabels();
904 }

References LabelStruct::BEGINS_IN_LABEL, DeleteLabel(), LabelStruct::ENDS_IN_LABEL, label, mLabels, SortLabels(), LabelStruct::SURROUNDS_LABEL, and LabelStruct::WITHIN_LABEL.

Here is the call graph for this function:

◆ SortLabels()

void LabelTrack::SortLabels ( )

Sorts the labels in order of their starting times. This function is called often (whilst dragging a label) We expect them to be very nearly in order, so insertion sort (with a linear search) is a reasonable choice.

Definition at line 968 of file LabelTrack.cpp.

969 {
970  const auto begin = mLabels.begin();
971  const auto nn = (int)mLabels.size();
972  int i = 1;
973  while (true)
974  {
975  // Find the next disorder
976  while (i < nn && mLabels[i - 1].getT0() <= mLabels[i].getT0())
977  ++i;
978  if (i >= nn)
979  break;
980 
981  // Where must element i sink to? At most i - 1, maybe less
982  int j = i - 2;
983  while( (j >= 0) && (mLabels[j].getT0() > mLabels[i].getT0()) )
984  --j;
985  ++j;
986 
987  // Now fix the disorder
988  std::rotate(
989  begin + j,
990  begin + i,
991  begin + i + 1
992  );
993 
994  // Let listeners update their stored indices
995  LabelTrackEvent evt{
996  EVT_LABELTRACK_PERMUTED, SharedPointer<LabelTrack>(),
997  mLabels[j].title, i, j
998  };
999  ProcessEvent( evt );
1000  }
1001 }

References mLabels.

Referenced by ChangeLabelsOnReverse(), Import(), Silence(), and WarpLabels().

Here is the caller graph for this function:

◆ SyncLockAdjust()

void LabelTrack::SyncLockAdjust ( double  oldT1,
double  newT1 
)
overridevirtual

Reimplemented from Track.

Definition at line 842 of file LabelTrack.cpp.

843 {
844  if (newT1 > oldT1) {
845  // Insert space within the track
846 
847  if (oldT1 > GetEndTime())
848  return;
849 
850  //Clear(oldT1, newT1);
851  ShiftLabelsOnInsert(newT1 - oldT1, oldT1);
852  }
853  else if (newT1 < oldT1) {
854  // Remove from the track
855  Clear(newT1, oldT1);
856  }
857 }

References Clear(), GetEndTime(), and ShiftLabelsOnInsert().

Here is the call graph for this function:

◆ WarpLabels()

void LabelTrack::WarpLabels ( const TimeWarper warper)

Definition at line 256 of file LabelTrack.cpp.

256  {
257  for (auto &labelStruct: mLabels) {
258  labelStruct.selectedRegion.setTimes(
259  warper.Warp(labelStruct.getT0()),
260  warper.Warp(labelStruct.getT1()));
261  }
262 
263  // This should not be needed, assuming the warper is nondecreasing, but
264  // let's not assume too much.
265  SortLabels();
266 }

References mLabels, SortLabels(), and TimeWarper::Warp().

Referenced by EffectChangeSpeed::ProcessLabelTrack(), and EffectSBSMS::ProcessLabelTrack().

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

◆ WriteXML()

void LabelTrack::WriteXML ( XMLWriter xmlFile) const
overridevirtual

Implements Track.

Definition at line 649 of file LabelTrack.cpp.

651 {
652  int len = mLabels.size();
653 
654  xmlFile.StartTag(wxT("labeltrack"));
655  this->Track::WriteCommonXMLAttributes( xmlFile );
656  xmlFile.WriteAttr(wxT("numlabels"), len);
657 
658  for (auto &labelStruct: mLabels) {
659  xmlFile.StartTag(wxT("label"));
660  labelStruct.getSelectedRegion()
661  .WriteXMLAttributes(xmlFile, wxT("t"), wxT("t1"));
662  // PRL: to do: write other selection fields
663  xmlFile.WriteAttr(wxT("title"), labelStruct.title);
664  xmlFile.EndTag(wxT("label"));
665  }
666 
667  xmlFile.EndTag(wxT("labeltrack"));
668 }

References Track::WriteCommonXMLAttributes().

Here is the call graph for this function:

Member Data Documentation

◆ mClipLen

double LabelTrack::mClipLen
private

Definition at line 178 of file LabelTrack.h.

◆ miLastLabel

int LabelTrack::miLastLabel
private

Definition at line 180 of file LabelTrack.h.

Referenced by FindNextLabel(), and FindPrevLabel().

◆ mLabels

LabelArray LabelTrack::mLabels
private

The documentation for this class was generated from the following files:
XMLWriter::EndTag
virtual void EndTag(const wxString &name)
Definition: XMLWriter.cpp:100
Track::GetDefaultName
wxString GetDefaultName() const
Definition: Track.h:411
Track::mOffset
double mOffset
Definition: Track.h:391
Track::WriteCommonXMLAttributes
void WriteCommonXMLAttributes(XMLWriter &xmlFile, bool includeNameAndSelected=true) const
Definition: Track.cpp:1243
LabelStruct::ENDS_IN_LABEL
@ ENDS_IN_LABEL
Definition: LabelTrack.h:59
XMLValueChecker::IsGoodInt
static bool IsGoodInt(const wxString &strInt)
Check that the supplied string can be converted to a long (32bit) integer.
Definition: XMLTagHandler.cpp:158
AudacityMessageBox
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption=AudacityMessageBoxCaptionStr(), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: AudacityMessageBox.h:20
XO
#define XO(s)
Definition: Internat.h:32
LabelTrack
A LabelTrack is a Track that holds labels (LabelStruct).
Definition: LabelTrack.h:88
LabelTrack::mClipLen
double mClipLen
Definition: LabelTrack.h:178
Track::HandleCommonXMLAttribute
bool HandleCommonXMLAttribute(const wxChar *attr, const wxChar *value)
Definition: Track.cpp:1257
LabelStruct
A LabelStruct holds information for ONE label in a LabelTrack.
Definition: LabelTrack.h:30
LabelTrack::ShiftLabelsOnInsert
void ShiftLabelsOnInsert(double length, double pt)
Definition: LabelTrack.cpp:200
LabelStruct::WITHIN_LABEL
@ WITHIN_LABEL
Definition: LabelTrack.h:57
Track::SetSelected
virtual void SetSelected(bool s)
Definition: Track.cpp:91
LabelTrack::Clear
void Clear(double t0, double t1) override
Definition: LabelTrack.cpp:151
Track::Track
Track()
Definition: Track.cpp:49
LabelTrack::GetEndTime
double GetEndTime() const override
Definition: LabelTrack.cpp:323
label
TranslatableString label
Definition: Tags.cpp:755
LabelStruct::selectedRegion
SelectedRegion selectedRegion
Definition: LabelTrack.h:70
Track::SetDefaultName
void SetDefaultName(const wxString &n)
Definition: Track.h:412
LabelTrack::miLastLabel
int miLastLabel
Definition: LabelTrack.h:180
LabelStruct::BEFORE_LABEL
@ BEFORE_LABEL
Definition: LabelTrack.h:54
LabelStruct::BadFormatException
Definition: LabelTrack.h:46
LabelTrack::PasteOver
bool PasteOver(double t, const Track *src)
Definition: LabelTrack.cpp:744
LabelStruct::BEGINS_IN_LABEL
@ BEGINS_IN_LABEL
Definition: LabelTrack.h:58
LabelTrackEvent
Definition: LabelTrack.h:184
TimeWarper::Warp
virtual double Warp(double originalTime) const =0
LabelTrack::AdjustTimeStampOnScale
double AdjustTimeStampOnScale(double t, double b, double e, double change)
Definition: LabelTrack.cpp:237
Track::GetSelected
bool GetSelected() const
Definition: Track.h:414
LabelStruct::Import
static LabelStruct Import(wxTextFile &file, int &index)
Definition: LabelTrack.cpp:371
Track::TypeSwitch
R TypeSwitch(const Functions &...functions)
Use this function rather than testing track type explicitly and making down-casts.
Definition: Track.h:692
Track::SetName
void SetName(const wxString &n)
Definition: Track.cpp:83
XMLValueChecker::IsGoodLongString
static bool IsGoodLongString(const wxString &str)
Definition: XMLTagHandler.cpp:52
_
#define _(s)
Definition: Internat.h:76
XMLWriter::WriteAttr
void WriteAttr(const wxString &name, const Identifier &value)
Definition: XMLWriter.h:34
LabelStruct::TimeRelations
TimeRelations
Relationships between selection region and labels.
Definition: LabelTrack.h:53
TrackKind::Label
@ Label
SelectedRegion::HandleXMLAttribute
bool HandleXMLAttribute(const wxChar *attr, const wxChar *value, const wxChar *legacyT0Name=sDefaultT0Name, const wxChar *legacyT1Name=sDefaultT1Name)
Definition: SelectedRegion.cpp:41
LabelTrack::Copy
Track::Holder Copy(double t0, double t1, bool forClipboard=true) const override
Definition: LabelTrack.cpp:693
LabelTrack::mLabels
LabelArray mLabels
Definition: LabelTrack.h:175
LabelStruct::SURROUNDS_LABEL
@ SURROUNDS_LABEL
Definition: LabelTrack.h:56
XMLWriter::StartTag
virtual void StartTag(const wxString &name)
Definition: XMLWriter.cpp:77
LabelTrack::DeleteLabel
void DeleteLabel(int index)
Definition: LabelTrack.cpp:951
LabelTrack::SortLabels
void SortLabels()
Definition: LabelTrack.cpp:968
SelectedRegion
Defines a selected portion of a project.
Definition: SelectedRegion.h:38