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 70 of file LabelTrack.cpp.

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

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 79 of file LabelTrack.cpp.

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

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 931 of file LabelTrack.cpp.

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

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

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 238 of file LabelTrack.cpp.

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

Referenced by ScaleLabels().

Here is the caller graph for this function:

◆ ChangeLabelsOnReverse()

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

Definition at line 214 of file LabelTrack.cpp.

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

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 152 of file LabelTrack.cpp.

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

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 340 of file LabelTrack.cpp.

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

◆ Copy()

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

Definition at line 694 of file LabelTrack.cpp.

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

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 671 of file LabelTrack.cpp.

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

References Clear(), and Copy().

Here is the call graph for this function:

◆ DeleteLabel()

void LabelTrack::DeleteLabel ( int  index)

Definition at line 952 of file LabelTrack.cpp.

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

References mLabels, and title.

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 537 of file LabelTrack.cpp.

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

References mLabels.

◆ FindNextLabel()

int LabelTrack::FindNextLabel ( const SelectedRegion currentSelection)

Definition at line 1023 of file LabelTrack.cpp.

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

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 1049 of file LabelTrack.cpp.

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

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 324 of file LabelTrack.cpp.

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

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 123 of file LabelTrack.cpp.

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

◆ 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 128 of file LabelTrack.cpp.

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

◆ 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 926 of file LabelTrack.cpp.

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

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 921 of file LabelTrack.cpp.

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

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 311 of file LabelTrack.cpp.

312 {
313  return mOffset;
314 }

References Track::mOffset.

◆ GetStartTime()

double LabelTrack::GetStartTime ( ) const
overridevirtual

Implements Track.

Definition at line 316 of file LabelTrack.cpp.

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

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 1004 of file LabelTrack.cpp.

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

References mLabels.

◆ HandleXMLChild()

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

Implements XMLTagHandler.

Definition at line 642 of file LabelTrack.cpp.

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

◆ HandleXMLTag()

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

Implements XMLTagHandler.

Definition at line 569 of file LabelTrack.cpp.

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

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

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 545 of file LabelTrack.cpp.

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

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 907 of file LabelTrack.cpp.

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

References mLabels.

◆ MakeInterval() [1/2]

auto LabelTrack::MakeInterval ( size_t  index)

Definition at line 109 of file LabelTrack.cpp.

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

◆ MakeInterval() [2/2]

auto LabelTrack::MakeInterval ( size_t  index) const

Definition at line 104 of file LabelTrack.cpp.

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

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 774 of file LabelTrack.cpp.

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

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 89 of file LabelTrack.cpp.

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

◆ PasteOver()

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

Definition at line 745 of file LabelTrack.cpp.

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

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 791 of file LabelTrack.cpp.

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

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 229 of file LabelTrack.cpp.

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

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 133 of file LabelTrack.cpp.

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

References mLabels.

◆ SetOffset()

void LabelTrack::SetOffset ( double  dOffset)
overridevirtual

Reimplemented from Track.

Definition at line 146 of file LabelTrack.cpp.

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

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 299 of file LabelTrack.cpp.

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

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 201 of file LabelTrack.cpp.

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

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 861 of file LabelTrack.cpp.

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

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 969 of file LabelTrack.cpp.

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

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 843 of file LabelTrack.cpp.

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

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

Here is the call graph for this function:

◆ WarpLabels()

void LabelTrack::WarpLabels ( const TimeWarper warper)

Definition at line 257 of file LabelTrack.cpp.

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

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 650 of file LabelTrack.cpp.

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

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:412
Track::mOffset
double mOffset
Definition: Track.h:392
Track::WriteCommonXMLAttributes
void WriteCommonXMLAttributes(XMLWriter &xmlFile, bool includeNameAndSelected=true) const
Definition: Track.cpp:1243
AudacityMessageBox
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption=XO("Message"), long style=wxOK|wxCENTRE, wxWindow *parent=NULL, int x=wxDefaultCoord, int y=wxDefaultCoord)
Definition: AudacityMessageBox.h:20
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:160
XO
#define XO(s)
Definition: Internat.h:31
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:201
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:152
Track::Track
Track()
Definition: Track.cpp:49
LabelTrack::GetEndTime
double GetEndTime() const override
Definition: LabelTrack.cpp:324
label
TranslatableString label
Definition: Tags.cpp:756
LabelStruct::selectedRegion
SelectedRegion selectedRegion
Definition: LabelTrack.h:70
Track::SetDefaultName
void SetDefaultName(const wxString &n)
Definition: Track.h:413
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:745
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
title
static const auto title
Definition: UpdateNoticeDialog.cpp:23
LabelTrack::AdjustTimeStampOnScale
double AdjustTimeStampOnScale(double t, double b, double e, double change)
Definition: LabelTrack.cpp:238
Track::GetSelected
bool GetSelected() const
Definition: Track.h:415
LabelStruct::Import
static LabelStruct Import(wxTextFile &file, int &index)
Definition: LabelTrack.cpp:372
Track::TypeSwitch
R TypeSwitch(const Functions &...functions)
Use this function rather than testing track type explicitly and making down-casts.
Definition: Track.h:693
Track::SetName
void SetName(const wxString &n)
Definition: Track.cpp:83
XMLValueChecker::IsGoodLongString
static bool IsGoodLongString(const wxString &str)
Definition: XMLTagHandler.cpp:54
_
#define _(s)
Definition: Internat.h:75
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:694
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:952
LabelTrack::SortLabels
void SortLabels()
Definition: LabelTrack.cpp:969
SelectedRegion
Defines a selected portion of a project.
Definition: SelectedRegion.h:38