38 const wxString &aTitle);
40 double getDuration()
const {
return selectedRegion.duration(); }
41 double getT0()
const {
return selectedRegion.t0(); }
42 double getT1()
const {
return selectedRegion.t1(); }
44 bool AdjustEdge(
int iEdge,
double fNewTime);
45 void MoveLabel(
int iEdge,
double fNewTime);
48 static LabelStruct Import(wxTextFile &file,
int &index);
50 void Export(wxTextFile &file)
const;
67 TimeRelations RegionRelation(
double reg_t0,
double reg_t1,
91 static wxString GetDefaultName();
113 void SetLabel(
size_t iLabel,
const LabelStruct &newLabel );
115 void SetOffset(
double dOffset)
override;
117 void SetSelected(
bool s)
override;
119 double GetOffset()
const override;
120 double GetStartTime()
const override;
121 double GetEndTime()
const override;
123 using Holder = std::shared_ptr<LabelTrack>;
129 bool HandleXMLTag(
const std::string_view& tag,
const AttributesList& attrs)
override;
130 XMLTagHandler *HandleXMLChild(
const std::string_view& tag)
override;
131 void WriteXML(
XMLWriter &xmlFile)
const override;
134 Track::Holder Copy (
double t0,
double t1,
bool forClipboard =
true)
const override;
135 void Clear(
double t0,
double t1)
override;
136 void Paste(
double t,
const Track * src)
override;
137 bool Repeat(
double t0,
double t1,
int n);
138 void SyncLockAdjust(
double oldT1,
double newT1)
override;
140 void Silence(
double t0,
double t1)
override;
141 void InsertSilence(
double t,
double len)
override;
143 void Import(wxTextFile & f);
144 void Export(wxTextFile & f)
const;
146 int GetNumLabels()
const;
155 void DeleteLabel(
int index);
158 bool PasteOver(
double t,
const Track *src);
164 void ShiftLabelsOnInsert(
double length,
double pt);
165 void ChangeLabelsOnReverse(
double b,
double e);
166 void ScaleLabels(
double b,
double e,
double change);
167 double AdjustTimeStampOnScale(
double t,
double b,
double e,
double change);
171 wxString GetTextOfLabels(
double t0,
double t1)
const;
176 const TypeInfo &GetTypeInfo()
const override;
177 static const TypeInfo &ClassTypeInfo();
185 ConstInterval MakeInterval (
size_t index )
const;
186 Interval MakeInterval (
size_t index );
187 ConstIntervals GetIntervals()
const override;
188 Intervals GetIntervals()
override;
208 wxEventType commandType,
const std::shared_ptr<LabelTrack> &pTrack,
209 const wxString &
title,
213 : wxEvent{ 0, commandType }
const TranslatableString name
std::vector< LabelStruct > LabelArray
ENUMERATE_TRACK_TYPE(LabelTrack)
wxDECLARE_EXPORTED_EVENT(AUDACITY_DLL_API, EVT_LABELTRACK_ADDITION, LabelTrackEvent)
declares abstract base class Track, TrackList, and iterators over TrackList
std::vector< Attribute > AttributesList
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Main class to control the export function.
A LabelStruct holds information for ONE label in a LabelTrack.
const SelectedRegion & getSelectedRegion() const
TimeRelations
Relationships between selection region and labels.
SelectedRegion selectedRegion
double getDuration() const
A LabelTrack is a Track that holds labels (LabelStruct).
const LabelArray & GetLabels() const
std::shared_ptr< LabelTrack > Holder
void OnLabelAdded(const wxString &title, int pos)
Defines a selected portion of a project.
Transforms one point in time to another point. For example, a time stretching effect might use one to...
Abstract base class for an object holding data associated with points on a time axis.
std::shared_ptr< Track > Holder
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
This class is an interface which should be implemented by classes which wish to be able to load and s...
Base class for XMLFileWriter and XMLStringWriter that provides the general functionality for creating...
IntervalData(size_t index)
LabelTrackEvent(const LabelTrackEvent &)=default
const std::weak_ptr< Track > mpTrack
LabelTrackEvent(wxEventType commandType, const std::shared_ptr< LabelTrack > &pTrack, const wxString &title, int formerPosition, int presentPosition)
wxEvent * Clone() const override
Optional extra information about an interval, appropriate to a subtype of Track.