44 const wxString &aTitle);
46 double getDuration()
const {
return selectedRegion.duration(); }
47 double getT0()
const {
return selectedRegion.t0(); }
48 double getT1()
const {
return selectedRegion.t1(); }
50 bool AdjustEdge(
int iEdge,
double fNewTime);
51 void MoveLabel(
int iEdge,
double fNewTime);
73 TimeRelations RegionRelation(
double reg_t0,
double reg_t1,
97 static wxString GetDefaultName();
119 void SetLabel(
size_t iLabel,
const LabelStruct &newLabel );
121 void MoveTo(
double dOffset)
override;
123 void SetSelected(
bool s)
override;
125 using Holder = std::shared_ptr<LabelTrack>;
134 bool HandleXMLTag(
const std::string_view& tag,
const AttributesList& attrs)
override;
135 XMLTagHandler *HandleXMLChild(
const std::string_view& tag)
override;
136 void WriteXML(
XMLWriter &xmlFile)
const override;
139 Track::Holder Copy(
double t0,
double t1,
bool forClipboard =
true)
141 void Clear(
double t0,
double t1)
override;
142 void Paste(
double t,
const Track &src)
override;
143 bool Repeat(
double t0,
double t1,
int n);
144 void SyncLockAdjust(
double oldT1,
double newT1)
override;
147 Silence(
double t0,
double t1,
ProgressReporter reportProgress = {})
override;
148 void InsertSilence(
double t,
double len)
override;
150 static LabelFormat FormatForFileName(
const wxString & fileName);
154 int GetNumLabels()
const;
163 void DeleteLabel(
int index);
166 bool PasteOver(
double t,
const Track &src);
172 void ShiftLabelsOnInsert(
double length,
double pt);
173 void ChangeLabelsOnReverse(
double b,
double e);
174 void ScaleLabels(
double b,
double e,
double change);
175 double AdjustTimeStampOnScale(
double t,
double b,
double e,
double change);
179 wxString GetTextOfLabels(
double t0,
double t1)
const;
184 const TypeInfo &GetTypeInfo()
const override;
185 static const TypeInfo &ClassTypeInfo();
192 ) : mpTrack{ track.SharedPointer<const
LabelTrack>() }
197 double Start()
const override;
198 double End()
const override;
199 size_t NChannels()
const override;
200 std::shared_ptr<ChannelInterval> DoGetChannel(
size_t iChannel)
override;
205 const std::shared_ptr<const LabelTrack>
mpTrack;
207 std::shared_ptr<Interval> MakeInterval(
size_t index);
212 size_t NIntervals()
const override;
215 std::shared_ptr<WideChannelGroupInterval> DoGetInterval(
size_t iInterval)
249 const wxString &
title,
const TranslatableString name
std::vector< LabelStruct > LabelArray
ENUMERATE_TRACK_TYPE(LabelTrack)
declares abstract base class Track, TrackList, and iterators over TrackList
std::function< void(double)> ProgressReporter
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).
static const FileNames::FileType WebVTTFiles
static const FileNames::FileType SubripFiles
const LabelArray & GetLabels() const
std::shared_ptr< LabelTrack > Holder
void OnLabelAdded(const wxString &title, int pos)
An object that sends messages to an open-ended list of subscribed callbacks.
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...
Generates overrides of channel-related functions.
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...
const std::shared_ptr< const LabelTrack > mpTrack
Interval(const LabelTrack &track, size_t index)
LabelTrackEvent(Type type, const std::shared_ptr< LabelTrack > &pTrack, const wxString &title, int formerPosition, int presentPosition)
const std::weak_ptr< Track > mpTrack
enum LabelTrackEvent::Type type
Empty argument passed to some public constructors.