Audacity 3.2.0
ExportUtils.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 ExportUtils.h
6
7 Dominic Mazzoni
8
9 Vitaly Sverchinsky split from ExportPlugin.h
10
11**********************************************************************/
12
13#pragma once
14
15#include "ExportTypes.h"
16#include "ExportPlugin.h"
17
18#include <functional>
19
20class AudacityProject;
21class TrackList;
22class WaveTrack;
23
24template <typename TrackType> struct TrackIterRange;
25
26class IMPORT_EXPORT_API ExportUtils final
27{
28public:
29
30 static TrackIterRange<const WaveTrack> FindExportWaveTracks(const TrackList& tracks, bool selectedOnly);
31
32 static ExportProcessor::Parameters ParametersFromEditor(const ExportOptionsEditor& editor);
33
35 {
36 Handled,
38 Cancel,
39 };
40
41 using ExportHook = std::function<ExportHookResult(AudacityProject&, const FileExtension&)>;
42
43 using Priority = unsigned;
44 static constexpr Priority DEFAULT_EXPORT_HOOK_PRIORITY = 0;
45
46 static void RegisterExportHook(ExportHook hook, Priority = DEFAULT_EXPORT_HOOK_PRIORITY);
47 static void PerformInteractiveExport(AudacityProject& project, const FileExtension& format);
48};
49
wxString FileExtension
File extension, not including any leading dot.
Definition: Identifier.h:224
@ Cancel
Open was cancelled by the extension.
@ Handled
Save was handled by the extension.
@ Continue
Save was not handled by the extension.
const auto tracks
const auto project
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
Editor objects are used to retrieve a set of export options, and configure exporting parameters accor...
std::vector< std::tuple< ExportOptionID, ExportValue > > Parameters
Definition: ExportPlugin.h:93
unsigned Priority
Definition: ExportUtils.h:43
std::function< ExportHookResult(AudacityProject &, const FileExtension &)> ExportHook
Definition: ExportUtils.h:41
A flat linked list of tracks supporting Add, Remove, Clear, and Contains, serialization of the list o...
Definition: Track.h:850
A Track that contains audio waveform data.
Definition: WaveTrack.h:203
Range between two TrackIters, usable in range-for statements, and with Visit member functions.
Definition: Track.h:682