47 const wxString &aTitle);
49 double getDuration()
const {
return selectedRegion.duration(); }
50 double getT0()
const {
return selectedRegion.t0(); }
51 double getT1()
const {
return selectedRegion.t1(); }
53 bool AdjustEdge(
int iEdge,
double fNewTime);
54 void MoveLabel(
int iEdge,
double fNewTime);
76 TimeRelations RegionRelation(
double reg_t0,
double reg_t1,
100 static wxString GetDefaultName();
122 void SetLabel(
size_t iLabel,
const LabelStruct &newLabel );
124 void MoveTo(
double dOffset)
override;
125 void ShiftBy(
double t0,
double delta)
override;
127 void SetSelected(
bool s)
override;
129 using Holder = std::shared_ptr<LabelTrack>;
138 bool HandleXMLTag(
const std::string_view& tag,
const AttributesList& attrs)
override;
139 XMLTagHandler *HandleXMLChild(
const std::string_view& tag)
override;
140 void WriteXML(
XMLWriter &xmlFile)
const override;
143 Track::Holder Copy(
double t0,
double t1,
bool forClipboard =
true)
145 void Clear(
double t0,
double t1)
override;
146 void Paste(
double t,
const Track &src)
override;
147 bool Repeat(
double t0,
double t1,
int n);
148 void SyncLockAdjust(
double oldT1,
double newT1)
override;
151 Silence(
double t0,
double t1,
ProgressReporter reportProgress = {})
override;
152 void InsertSilence(
double t,
double len)
override;
154 static LabelFormat FormatForFileName(
const wxString & fileName);
158 int GetNumLabels()
const;
167 void DeleteLabel(
int index);
170 bool PasteOver(
double t,
const Track &src);
176 void ShiftLabelsOnInsert(
double length,
double pt);
177 void ChangeLabelsOnReverse(
double b,
double e);
178 void ScaleLabels(
double b,
double e,
double change);
179 double AdjustTimeStampOnScale(
double t,
double b,
double e,
double change);
183 wxString GetTextOfLabels(
double t0,
double t1)
const;
188 const TypeInfo &GetTypeInfo()
const override;
189 static const TypeInfo &ClassTypeInfo();
196 ) : mpTrack{ track.SharedPointer<const
LabelTrack>() }
201 double Start()
const override;
202 double End()
const override;
203 size_t NChannels()
const override;
204 std::shared_ptr<ChannelInterval> DoGetChannel(
size_t iChannel)
override;
209 const std::shared_ptr<const LabelTrack>
mpTrack;
211 std::shared_ptr<Interval> MakeInterval(
size_t index);
216 size_t NIntervals()
const override;
219 std::shared_ptr<WideChannelGroupInterval> DoGetInterval(
size_t iInterval)
253 const wxString &
title,
LABEL_TRACK_API EnumSetting< bool > LabelStyleSetting
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.