Audacity 3.2.0
Classes | Namespaces | Enumerations | Functions
ExportMultiple.cpp File Reference
#include "ExportMultiple.h"
#include <wx/defs.h>
#include <wx/button.h>
#include <wx/checkbox.h>
#include <wx/choice.h>
#include <wx/dialog.h>
#include <wx/dirdlg.h>
#include <wx/listbase.h>
#include <wx/filefn.h>
#include <wx/filename.h>
#include <wx/log.h>
#include <wx/radiobut.h>
#include <wx/simplebook.h>
#include <wx/statbox.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/textdlg.h>
#include "FileNames.h"
#include "LabelTrack.h"
#include "Project.h"
#include "ProjectSettings.h"
#include "ProjectWindow.h"
#include "ProjectWindows.h"
#include "Prefs.h"
#include "SelectionState.h"
#include "ShuttleGui.h"
#include "../TagsEditor.h"
#include "WaveTrack.h"
#include "HelpSystem.h"
#include "AudacityMessageBox.h"
#include "AudacityTextEntryDialog.h"
#include "ProgressDialog.h"
Include dependency graph for ExportMultiple.cpp:

Go to the source code of this file.

Classes

class  anonymous_namespace{ExportMultiple.cpp}::ExportKit
 A private class used to store the information needed to do an export. More...
 

Namespaces

namespace  anonymous_namespace{ExportMultiple.cpp}
 

Enumerations

enum  {
  FormatID = 10001 , OptionsID , DirID , CreateID ,
  ChooseID , LabelID , FirstID , FirstFileNameID ,
  TrackID , ByNameAndNumberID , ByNameID , ByNumberID ,
  PrefixID , OverwriteID
}
 

Functions

 EVT_LIST_ITEM_ACTIVATED (wxID_ANY, SuccessDialog::OnItemActivated) ExportMultipleDialog
 
static unsigned GetNumExportChannels (const TrackList &tracks)
 

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
FormatID 
OptionsID 
DirID 
CreateID 
ChooseID 
LabelID 
FirstID 
FirstFileNameID 
TrackID 
ByNameAndNumberID 
ByNameID 
ByNumberID 
PrefixID 
OverwriteID 

Definition at line 79 of file ExportMultiple.cpp.

79 {
80 FormatID = 10001,
82 DirID,
85 LabelID,
86 FirstID,
88 TrackID,
94};
@ LabelID
@ CreateID
@ TrackID
@ PrefixID
@ ByNumberID
@ ChooseID
@ OverwriteID
@ DirID
@ FormatID
@ ByNameAndNumberID
@ OptionsID
@ FirstFileNameID
@ ByNameID
@ FirstID

Function Documentation

◆ EVT_LIST_ITEM_ACTIVATED()

EVT_LIST_ITEM_ACTIVATED ( wxID_ANY  ,
SuccessDialog::OnItemActivated   
)

Definition at line 120 of file ExportMultiple.cpp.

129 wxID_ANY, XO("Export Multiple") )
130, mExporter{ *project }
131, mSelectionState{ SelectionState::Get( *project ) }
132{
133 SetName();
134
135 mProject = project;
136 mTracks = &TrackList::Get( *project );
137 // Construct an array of non-owning pointers
138 for (const auto &plugin : mExporter.GetPlugins())
139 mPlugins.push_back(plugin.get());
140
141 this->CountTracksAndLabels();
142
143 mBook = NULL;
144
146
147 // Creating some of the widgets cause events to fire
148 // and we don't want that until after we're completely
149 // created. (Observed on Windows)
150 mInitialized = false;
151 PopulateOrExchange(S);
152 mInitialized = true;
153
154 Layout();
155 Fit();
156 SetMinSize(GetSize());
157 Center();
158
159 EnableControls();
160}
XO("Cut/Copy/Paste")
AUDACITY_DLL_API wxFrame & GetProjectFrame(AudacityProject &project)
Get the top-level window associated with the project (as a wxFrame only, when you do not need to use ...
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:46
const auto project
#define S(N)
Definition: ToChars.cpp:64
static SelectionState & Get(AudacityProject &project)
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:625
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:374

References project.

◆ GetNumExportChannels()

static unsigned GetNumExportChannels ( const TrackList tracks)
static

Definition at line 701 of file ExportMultiple.cpp.

702{
703 bool anySolo =
704 !(tracks.Leaders<const WaveTrack>() + &WaveTrack::GetSolo).empty();
705
706 // Want only unmuted wave tracks.
707 const auto range = tracks.Leaders<const WaveTrack>() -
709 return std::all_of(range.begin(), range.end(),
710 [](auto *pTrack){ return IsMono(*pTrack); }
711 )
712 ? 1
713 : 2;
714}
const auto tracks
bool GetNotSolo() const
Definition: PlayableTrack.h:50
A Track that contains audio waveform data.
Definition: WaveTrack.h:59
bool GetMute() const override
May vary asynchronously.
Definition: WaveTrack.cpp:1930
bool GetSolo() const override
May vary asynchronously.
Definition: WaveTrack.cpp:1935

References WaveTrack::GetMute(), PlayableTrack::GetNotSolo(), WaveTrack::GetSolo(), and tracks.

Referenced by ExportMultipleDialog::ExportMultipleByLabel().

Here is the call graph for this function:
Here is the caller graph for this function: