Audacity  3.0.3
Public Member Functions | Static Public Member Functions | Public Attributes | Protected Attributes | List of all members
ApplyMacroDialog Class Reference

Shows progress in executing commands in MacroCommands. More...

#include <BatchProcessDialog.h>

Inheritance diagram for ApplyMacroDialog:
[legend]
Collaboration diagram for ApplyMacroDialog:
[legend]

Public Member Functions

 ApplyMacroDialog (wxWindow *parent, AudacityProject &project, bool bInherited=false)
 
virtual ~ApplyMacroDialog ()
 
void Populate ()
 
void PopulateOrExchange (ShuttleGui &S)
 Defines the dialog and does data exchange with it. More...
 
virtual void OnApplyToProject (wxCommandEvent &event)
 
virtual void OnApplyToFiles (wxCommandEvent &event)
 
virtual void OnCancel (wxCommandEvent &event)
 
virtual void OnHelp (wxCommandEvent &event)
 
virtual ManualPageID GetHelpPageName ()
 
void PopulateMacros ()
 
void ApplyMacroToProject (int iMacro, bool bHasGui=true)
 
void ApplyMacroToProject (const CommandID &MacroID, bool bHasGui=true)
 
- Public Member Functions inherited from wxDialogWrapper
 wxDialogWrapper ()
 
 wxDialogWrapper (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
bool Create (wxWindow *parent, wxWindowID id, const TranslatableString &title, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxDEFAULT_DIALOG_STYLE, const TranslatableString &name=XO("Dialog"))
 
void SetTitle (const TranslatableString &title)
 
void SetLabel (const TranslatableString &title)
 
void SetName (const TranslatableString &title)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxDialog >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Static Public Member Functions

static CommandID MacroIdOfName (const wxString &MacroName)
 

Public Attributes

wxListCtrl * mList
 
wxListCtrl * mMacros
 
MacroCommands mMacroCommands
 
wxButton * mResize
 Provides list of available commands. More...
 
wxButton * mOK
 
wxButton * mCancel
 
wxTextCtrl * mResults
 
bool mAbort
 
bool mbExpanded
 
wxString mActiveMacro
 
wxString mMacroBeingRenamed
 

Protected Attributes

AudacityProjectmProject
 
const MacroCommandsCatalog mCatalog
 

Detailed Description

Shows progress in executing commands in MacroCommands.

Definition at line 29 of file BatchProcessDialog.h.

Constructor & Destructor Documentation

◆ ApplyMacroDialog()

ApplyMacroDialog::ApplyMacroDialog ( wxWindow *  parent,
AudacityProject project,
bool  bInherited = false 
)

Definition at line 91 of file BatchProcessDialog.cpp.

92  :
93  wxDialogWrapper(parent, wxID_ANY, MacrosPaletteTitle,
94  wxDefaultPosition, wxDefaultSize,
95  wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
96  , mMacroCommands{ project }
97  , mProject{ project }
98  , mCatalog( &project )
99 {
100  mAbort = false;
101  mbExpanded = false;
102  if( bInherited )
103  return;
104  SetLabel(MacrosPaletteTitle); // Provide visual label
105  SetName(MacrosPaletteTitle); // Provide audible label
106  Populate();
107 
108 }

◆ ~ApplyMacroDialog()

ApplyMacroDialog::~ApplyMacroDialog ( )
virtual

Definition at line 110 of file BatchProcessDialog.cpp.

111 {
112 }

Member Function Documentation

◆ ApplyMacroToProject() [1/2]

void ApplyMacroDialog::ApplyMacroToProject ( const CommandID MacroID,
bool  bHasGui = true 
)

Definition at line 253 of file BatchProcessDialog.cpp.

254 {
255  for( int i=0;i<mMacros->GetItemCount();i++){
256  wxString name = mMacros->GetItemText(i);
257  if( MacroIdOfName( name ) == MacroID ){
258  ApplyMacroToProject( i, bHasGui );
259  return;
260  }
261  }
262 }

References ApplyMacroToProject(), MacroIdOfName(), mMacros, and name.

Here is the call graph for this function:

◆ ApplyMacroToProject() [2/2]

void ApplyMacroDialog::ApplyMacroToProject ( int  iMacro,
bool  bHasGui = true 
)

Definition at line 265 of file BatchProcessDialog.cpp.

266 {
267  wxString name = mMacros->GetItemText(iMacro);
268  if( name.empty() )
269  return;
270 
271 #ifdef OPTIONAL_ACTIVITY_WINDOW
272  wxDialogWrapper activityWin( this, wxID_ANY, GetTitle());
273  activityWin.SetName();
274  ShuttleGui S(&activityWin, eIsCreating);
275 
276  S.StartHorizontalLay(wxCENTER, false);
277  {
278  S.StartStatic( {}, false); // deliberately not translated (!)
279  {
280  S.SetBorder(20);
281  S.AddFixedText(XO("Applying '%s' to current project")
282  .Format( name ) );
283  }
284  S.EndStatic();
285  }
286  S.EndHorizontalLay();
287 
288  activityWin.Layout();
289  activityWin.Fit();
290  activityWin.CenterOnScreen();
291  // Avoid overlap with progress.
292  int x,y;
293  activityWin.GetPosition( &x, &y );
294  activityWin.Move(wxMax(0,x-300), 0);
295  activityWin.Show();
296 
297  // Without this the newly created dialog may not show completely.
298  wxYield();
299 #endif
300 
301  //Since we intend to keep this dialog open, there is no reason to hide it
302  //and then show it again.
303  //if( bHasGui )
304  // Hide();
305 
306  gPrefs->Write(wxT("/Batch/ActiveMacro"), name);
307  gPrefs->Flush();
308 
310 
311  // The disabler must get deleted before the EndModal() call. Otherwise,
312  // the menus on OSX will remain disabled.
313  bool success;
314  {
315 #ifdef OPTIONAL_ACTIVITY_WINDOW
316  wxWindowDisabler wd(&activityWin);
317 #endif
318  success = GuardedCall< bool >(
319  [this]{ return mMacroCommands.ApplyMacro(mCatalog); } );
320  }
321 
322  if( !bHasGui )
323  return;
324 
325  Show();
326  Raise();
327 }

References ShuttleGuiBase::AddFixedText(), MacroCommands::ApplyMacro(), eIsCreating, TranslatableString::empty(), ShuttleGuiBase::EndHorizontalLay(), ShuttleGuiBase::EndStatic(), FileConfig::Flush(), gPrefs, mCatalog, mMacroCommands, mMacros, name, MacroCommands::ReadMacro(), ShuttleGuiBase::SetBorder(), wxDialogWrapper::SetName(), ShuttleGuiBase::StartHorizontalLay(), ShuttleGuiBase::StartStatic(), and XO.

Referenced by ApplyMacroToProject(), PluginActions::Handler::OnApplyMacroDirectlyByName(), and OnApplyToProject().

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

◆ GetHelpPageName()

virtual ManualPageID ApplyMacroDialog::GetHelpPageName ( )
inlinevirtual

Reimplemented in MacrosWindow.

Definition at line 44 of file BatchProcessDialog.h.

44 {return "Apply_Macro";}

Referenced by OnHelp().

Here is the caller graph for this function:

◆ MacroIdOfName()

CommandID ApplyMacroDialog::MacroIdOfName ( const wxString &  MacroName)
static

Definition at line 243 of file BatchProcessDialog.cpp.

244 {
245  wxString Temp = MacroName;
246  Temp.Replace(" ","");
247  Temp = wxString( "Macro_" ) + Temp;
248  return Temp;
249 }

Referenced by ApplyMacroToProject(), and anonymous_namespace{PluginMenus.cpp}::PopulateMacrosMenu().

Here is the caller graph for this function:

◆ OnApplyToFiles()

void ApplyMacroDialog::OnApplyToFiles ( wxCommandEvent &  event)
virtual

Reimplemented in MacrosWindow.

Definition at line 329 of file BatchProcessDialog.cpp.

330 {
331  long item = mMacros->GetNextItem(-1,
332  wxLIST_NEXT_ALL,
333  wxLIST_STATE_SELECTED);
334  if (item == -1) {
335  AudacityMessageBox( XO("No macro selected") );
336  return;
337  }
338 
339  wxString name = mMacros->GetItemText(item);
340  gPrefs->Write(wxT("/Batch/ActiveMacro"), name);
341  gPrefs->Flush();
342 
343  AudacityProject *project = &mProject;
344  if (!TrackList::Get( *project ).empty()) {
346  XO("Please save and close the current project first.") );
347  return;
348  }
349 
350  // This insures that we start with an empty and temporary project
353 
354  auto prompt = XO("Select file(s) for batch processing...");
355 
356  const auto fileTypes = Importer::Get().GetFileTypes();
357 
358  auto path = FileNames::FindDefaultPath(FileNames::Operation::Open);
359  FileDialogWrapper dlog(this,
360  prompt,
361  path,
362  wxT(""),
363  fileTypes,
364  wxFD_OPEN | wxFD_MULTIPLE | wxRESIZE_BORDER);
365 
366  dlog.SetFilterIndex( Importer::SelectDefaultOpenType( fileTypes ) );
367  if (dlog.ShowModal() != wxID_OK) {
368  Raise();
369  return;
370  }
371  Raise();
372 
373  wxArrayString files;
374  dlog.GetPaths(files);
375 
376  files.Sort();
377 
378  wxDialogWrapper activityWin(this, wxID_ANY, Verbatim( GetTitle() ),
379  wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER
380  );
381  activityWin.SetName();
382  ShuttleGui S(&activityWin, eIsCreating);
383 
384  wxListCtrl * fileList = NULL;
385 
386  S.StartVerticalLay(1);
387  {
388  S.StartStatic(XO("Applying..."), 1);
389  {
390  auto imageList = std::make_unique<wxImageList>(9, 16);
391  imageList->Add(wxIcon(empty9x16_xpm));
392  imageList->Add(wxIcon(arrow_xpm));
393 
394  fileList = S.Id(CommandsListID)
395  .Style(wxSUNKEN_BORDER | wxLC_REPORT | wxLC_HRULES | wxLC_VRULES |
396  wxLC_SINGLE_SEL)
397  .AddListControlReportMode( { XO("File") } );
398  // AssignImageList takes ownership
399  fileList->AssignImageList(imageList.release(), wxIMAGE_LIST_SMALL);
400  }
401  S.EndStatic();
402 
403  S.StartHorizontalLay(wxCENTER, 0);
404  {
405  S.Id(wxID_CANCEL).AddButton(XXO("&Cancel"));
406  }
407  S.EndHorizontalLay();
408  }
409  S.EndVerticalLay();
410 
411  int i;
412  for (i = 0; i < (int)files.size(); i++ ) {
413  fileList->InsertItem(i, files[i], i == 0);
414  }
415 
416  // Set the column size for the files list.
417  fileList->SetColumnWidth(0, wxLIST_AUTOSIZE);
418 
419  int width = wxMin( fileList->GetColumnWidth(0), 1000);
420  wxSize sz = fileList->GetClientSize();
421  if (sz.GetWidth() < width ) {
422  sz.SetWidth(width);
423  if (sz.GetHeight() < width *0.7)
424  sz.SetHeight(width * 0.7);
425  fileList->SetInitialSize(sz);
426  }
427 
428  activityWin.Layout();
429  activityWin.Fit();
430  activityWin.CenterOnScreen();
431  // Avoid overlap with progress.
432  int x,y;
433  activityWin.GetPosition( &x, &y );
434  activityWin.Move(wxMax(0,x-300), 0);
435  activityWin.Show();
436 
437  // Without this the newly created dialog may not show completely.
438  wxYield();
439  // We could avoid hiding, but there are many dialogs on screen,
440  // and hiding this one temporarily has some advantages.
441  Hide();
442 
444  {
445  // Move global clipboard contents aside temporarily
446  Clipboard tempClipboard;
447  auto &globalClipboard = Clipboard::Get();
448  globalClipboard.Swap(tempClipboard);
449  auto cleanup = finally([&]{
450  globalClipboard.Swap(tempClipboard);
451  });
452 
453  wxWindowDisabler wd(&activityWin);
454  for (i = 0; i < (int)files.size(); i++) {
455  if (i > 0) {
456  //Clear the arrow in previous item.
457  fileList->SetItemImage(i - 1, 0, 0);
458  }
459  fileList->SetItemImage(i, 1, 1);
460  fileList->EnsureVisible(i);
461 
462  auto success = GuardedCall< bool >([&] {
463  ProjectFileManager::Get(*project).Import(files[i]);
464  ProjectWindow::Get(*project).ZoomAfterImport(nullptr);
467  return false;
468 
469  if (!activityWin.IsShown() || mAbort)
470  return false;
471 
472  return true;
473  });
474 
475  // Ensure project is completely reset
477  // Bug2567:
478  // Must also destroy the clipboard, to be sure sample blocks are
479  // all freed and their ids can be reused safely in the next pass
480  globalClipboard.Clear();
481 
482  if (!success)
483  break;
484  }
485  }
486 
487  Show();
488  Raise();
489 }

References ShuttleGuiBase::AddButton(), ShuttleGuiBase::AddListControlReportMode(), MacroCommands::ApplyMacro(), AudacityMessageBox(), ProjectFileManager::CloseProject(), CommandsListID, SelectUtilities::DoSelectAll(), eIsCreating, TrackList::empty(), ShuttleGuiBase::EndHorizontalLay(), ShuttleGuiBase::EndStatic(), ShuttleGuiBase::EndVerticalLay(), FileNames::FindDefaultPath(), FileConfig::Flush(), Clipboard::Get(), Importer::Get(), ProjectFileManager::Get(), ProjectManager::Get(), ProjectWindow::Get(), TrackList::Get(), Importer::GetFileTypes(), FileDialog::GetPaths(), gPrefs, ShuttleGui::Id(), ProjectFileManager::Import(), mAbort, mCatalog, mMacroCommands, mMacros, mProject, name, ProjectFileManager::OpenProject(), MacroCommands::ReadMacro(), ProjectManager::ResetProjectToEmpty(), Importer::SelectDefaultOpenType(), FileDialog::SetFilterIndex(), wxDialogWrapper::SetName(), FileDialog::ShowModal(), ShuttleGuiBase::StartHorizontalLay(), ShuttleGuiBase::StartStatic(), ShuttleGuiBase::StartVerticalLay(), ShuttleGui::Style(), Verbatim(), XO, XXO, and ProjectWindow::ZoomAfterImport().

Referenced by MacrosWindow::OnApplyToFiles().

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

◆ OnApplyToProject()

void ApplyMacroDialog::OnApplyToProject ( wxCommandEvent &  event)
virtual

Reimplemented in MacrosWindow.

Definition at line 230 of file BatchProcessDialog.cpp.

231 {
232  long item = mMacros->GetNextItem(-1,
233  wxLIST_NEXT_ALL,
234  wxLIST_STATE_SELECTED);
235 
236  if (item == -1) {
237  AudacityMessageBox(XO("No macro selected"));
238  return;
239  }
240  ApplyMacroToProject( item );
241 }

References ApplyMacroToProject(), AudacityMessageBox(), mMacros, and XO.

Referenced by MacrosWindow::OnApplyToProject().

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

◆ OnCancel()

void ApplyMacroDialog::OnCancel ( wxCommandEvent &  event)
virtual

Reimplemented in MacrosWindow.

Definition at line 491 of file BatchProcessDialog.cpp.

492 {
493  Hide();
494 }

◆ OnHelp()

void ApplyMacroDialog::OnHelp ( wxCommandEvent &  event)
virtual

Definition at line 224 of file BatchProcessDialog.cpp.

225 {
226  const auto &page = GetHelpPageName();
227  HelpSystem::ShowHelp(this, page, true);
228 }

References GetHelpPageName(), and HelpSystem::ShowHelp().

Here is the call graph for this function:

◆ Populate()

void ApplyMacroDialog::Populate ( )

Definition at line 114 of file BatchProcessDialog.cpp.

115 {
116  //------------------------- Main section --------------------
117  ShuttleGui S(this, eIsCreating);
119  // ----------------------- End of main section --------------
120  // Get and validate the currently active macro
121  mActiveMacro = gPrefs->Read(wxT("/Batch/ActiveMacro"), wxT(""));
122  // Go populate the macros list.
123  PopulateMacros();
124 
125  Layout();
126  Fit();
127  wxSize sz = GetSize();
128  SetSizeHints( sz );
129 
130  // Size and place window
131  SetSize(std::min(wxSystemSettings::GetMetric(wxSYS_SCREEN_X) * 3 / 4, sz.GetWidth()),
132  std::min(wxSystemSettings::GetMetric(wxSYS_SCREEN_Y) * 4 / 5, 400));
133 
134  Center();
135 
136  // Set the column size for the macros list.
137  sz = mMacros->GetClientSize();
138  mMacros->SetColumnWidth(0, sz.x);
139 }

References eIsCreating, gPrefs, mActiveMacro, min(), mMacros, PopulateMacros(), and PopulateOrExchange().

Referenced by MacrosWindow::UpdateDisplay().

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

◆ PopulateMacros()

void ApplyMacroDialog::PopulateMacros ( )

This clears and updates the contents of mMacros, the list of macros. It has cut-and-paste code from PopulateList, and both should call a shared function.

Definition at line 190 of file BatchProcessDialog.cpp.

191 {
192  auto names = mMacroCommands.GetNames();
193  int i;
194 
195  int topItem = mMacros->GetTopItem();
196  mMacros->DeleteAllItems();
197  for (i = 0; i < (int)names.size(); i++) {
198  mMacros->InsertItem(i, names[i]);
199  }
200 
201  int item = mMacros->FindItem(-1, mActiveMacro);
202  bool bFound = item >=0;
203  if (item == -1) {
204  item = 0;
205  mActiveMacro = mMacros->GetItemText(0);
206  }
207 
208  // Select the name in the list...this will fire an event.
209  mMacros->SetItemState(item, wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED,
210  wxLIST_STATE_SELECTED | wxLIST_STATE_FOCUSED);
211 
212  if( 0 <= topItem && topItem < (int)mMacros->GetItemCount())
213  {
214  // Workaround for scrolling being windows only.
215  // Try to scroll back to where we once were...
216  mMacros->EnsureVisible( (int)mMacros->GetItemCount() -1 );
217  mMacros->EnsureVisible( topItem );
218  // And then make sure whatever is selected is still visible...
219  if( bFound )
220  mMacros->EnsureVisible( item );
221  }
222 }

References MacroCommands::GetNames(), mActiveMacro, mMacroCommands, mMacros, and names.

Referenced by MacrosWindow::OnAdd(), MacrosWindow::OnImport(), MacrosWindow::OnMacrosEndEdit(), MacrosWindow::OnRemove(), Populate(), and MacrosWindow::Populate().

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

◆ PopulateOrExchange()

void ApplyMacroDialog::PopulateOrExchange ( ShuttleGui S)

Defines the dialog and does data exchange with it.

Definition at line 142 of file BatchProcessDialog.cpp.

143 {
144  /*i18n-hint: A macro is a sequence of commands that can be applied
145  * to one or more audio files.*/
146  S.StartStatic(XO("Select Macro"), 1);
147  {
148  mMacros = S.Id(MacrosListID).Prop(1)
149  .Style(wxSUNKEN_BORDER | wxLC_REPORT | wxLC_HRULES | wxLC_VRULES |
150  wxLC_SINGLE_SEL)
151  // i18n-hint: This is the heading for a column in the edit macros dialog
152  .AddListControlReportMode( { XO("Macro") } );
153  }
154  S.EndStatic();
155 
156  S.StartHorizontalLay(wxEXPAND, 0);
157  {
158  S.AddPrompt( XXO("Apply Macro to:") );
159  wxButton* btn = S.Id(ApplyToProjectID)
160  .Name(XO("Apply macro to project"))
161  .AddButton(XXO("&Project"));
162 #if wxUSE_ACCESSIBILITY
163  // so that name can be set on a standard control
164  btn->SetAccessible(safenew WindowAccessible(btn));
165 #endif
166 
167  btn = S.Id(ApplyToFilesID)
168  .Name(XO("Apply macro to files..."))
169  .AddButton(XXO("&Files..."));
170 #if wxUSE_ACCESSIBILITY
171  // so that name can be set on a standard control
172  btn->SetAccessible(safenew WindowAccessible(btn));
173 #endif
174  }
175  S.EndHorizontalLay();
176 
177  S.StartHorizontalLay(wxEXPAND, 0);
178  {
179  /* i18n-hint: The Expand button makes the dialog bigger, with more in it */
180  mResize = S.Id(ExpandID).AddButton(XXO("&Expand"));
181  S.AddSpace( 10,10,1 );
183  }
184  S.EndHorizontalLay();
185 }

References ShuttleGuiBase::AddButton(), ShuttleGuiBase::AddListControlReportMode(), ShuttleGuiBase::AddPrompt(), ShuttleGui::AddSpace(), ShuttleGui::AddStandardButtons(), ApplyToFilesID, ApplyToProjectID, eCloseButton, eHelpButton, ShuttleGuiBase::EndHorizontalLay(), ShuttleGuiBase::EndStatic(), ExpandID, ShuttleGui::Id(), MacrosListID, mMacros, mResize, ShuttleGui::Name(), ShuttleGui::Prop(), safenew, ShuttleGuiBase::StartHorizontalLay(), ShuttleGuiBase::StartStatic(), ShuttleGui::Style(), XO, and XXO.

Referenced by Populate().

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

Member Data Documentation

◆ mAbort

bool ApplyMacroDialog::mAbort

Definition at line 60 of file BatchProcessDialog.h.

Referenced by OnApplyToFiles().

◆ mActiveMacro

wxString ApplyMacroDialog::mActiveMacro

◆ mbExpanded

bool ApplyMacroDialog::mbExpanded

◆ mCancel

wxButton* ApplyMacroDialog::mCancel

Definition at line 58 of file BatchProcessDialog.h.

◆ mCatalog

const MacroCommandsCatalog ApplyMacroDialog::mCatalog
protected

Definition at line 67 of file BatchProcessDialog.h.

Referenced by MacrosWindow::AddItem(), ApplyMacroToProject(), and OnApplyToFiles().

◆ mList

wxListCtrl* ApplyMacroDialog::mList

◆ mMacroBeingRenamed

wxString ApplyMacroDialog::mMacroBeingRenamed

◆ mMacroCommands

MacroCommands ApplyMacroDialog::mMacroCommands

◆ mMacros

wxListCtrl* ApplyMacroDialog::mMacros

◆ mOK

wxButton* ApplyMacroDialog::mOK

Definition at line 57 of file BatchProcessDialog.h.

◆ mProject

AudacityProject& ApplyMacroDialog::mProject
protected

Definition at line 66 of file BatchProcessDialog.h.

Referenced by OnApplyToFiles().

◆ mResize

wxButton* ApplyMacroDialog::mResize

Provides list of available commands.

Definition at line 56 of file BatchProcessDialog.h.

Referenced by PopulateOrExchange(), MacrosWindow::PopulateOrExchange(), and MacrosWindow::UpdateDisplay().

◆ mResults

wxTextCtrl* ApplyMacroDialog::mResults

Definition at line 59 of file BatchProcessDialog.h.


The documentation for this class was generated from the following files:
ProjectFileManager::OpenProject
bool OpenProject()
Definition: ProjectFileManager.cpp:764
eIsCreating
@ eIsCreating
Definition: ShuttleGui.h:38
TranslatableString::empty
bool empty() const
Definition: TranslatableString.h:72
MacrosPaletteTitle
#define MacrosPaletteTitle
Definition: BatchProcessDialog.cpp:70
ApplyToProjectID
#define ApplyToProjectID
Definition: BatchProcessDialog.cpp:78
ExpandID
#define ExpandID
Definition: BatchProcessDialog.cpp:80
AudacityMessageBox
int AudacityMessageBox(const TranslatableString &message, const TranslatableString &caption, long style, wxWindow *parent, int x, int y)
Definition: AudacityMessageBox.cpp:17
FileNames::FindDefaultPath
FILES_API FilePath FindDefaultPath(Operation op)
gPrefs
FileConfig * gPrefs
Definition: Prefs.cpp:70
eHelpButton
@ eHelpButton
Definition: ShuttleGui.h:604
Importer::Get
static Importer & Get()
Definition: Import.cpp:71
ApplyMacroDialog::mAbort
bool mAbort
Definition: BatchProcessDialog.h:60
Format
Abstract base class used in importing a file.
MacroCommands::ReadMacro
wxString ReadMacro(const wxString &macro, wxWindow *parent=nullptr)
Definition: BatchCommands.cpp:124
ApplyMacroDialog::mProject
AudacityProject & mProject
Definition: BatchProcessDialog.h:66
ShuttleGui::AddSpace
wxSizerItem * AddSpace(int width, int height, int prop=0)
Definition: ShuttleGui.cpp:2459
MacrosListID
#define MacrosListID
Definition: BatchProcessDialog.cpp:76
MacroCommands::ApplyMacro
bool ApplyMacro(const MacroCommandsCatalog &catalog, const wxString &filename={})
Definition: BatchCommands.cpp:688
XO
#define XO(s)
Definition: Internat.h:31
CommandsListID
#define CommandsListID
Definition: BatchProcessDialog.cpp:77
ApplyMacroDialog::mActiveMacro
wxString mActiveMacro
Definition: BatchProcessDialog.h:62
ProjectWindow::Get
static ProjectWindow & Get(AudacityProject &project)
Definition: ProjectWindow.cpp:535
wxDialogWrapper::SetLabel
void SetLabel(const TranslatableString &title)
Definition: wxPanelWrapper.cpp:71
ProjectManager::ResetProjectToEmpty
void ResetProjectToEmpty()
Definition: ProjectManager.cpp:972
HelpSystem::ShowHelp
static void ShowHelp(wxWindow *parent, const FilePath &localFileName, const URLString &remoteURL, bool bModal=false, bool alwaysDefaultBrowser=false)
Definition: HelpSystem.cpp:237
ShuttleGui::Id
ShuttleGui & Id(int id)
Definition: ShuttleGui.cpp:2274
ApplyMacroDialog::mbExpanded
bool mbExpanded
Definition: BatchProcessDialog.h:61
ShuttleGui::Style
ShuttleGui & Style(long iStyle)
Definition: ShuttleGui.h:727
ApplyMacroDialog::ApplyMacroToProject
void ApplyMacroToProject(int iMacro, bool bHasGui=true)
Definition: BatchProcessDialog.cpp:265
ProjectManager::Get
static ProjectManager & Get(AudacityProject &project)
Definition: ProjectManager.cpp:70
ApplyToFilesID
#define ApplyToFilesID
Definition: BatchProcessDialog.cpp:79
XXO
#define XXO(s)
Definition: Internat.h:44
ShuttleGuiBase::EndHorizontalLay
void EndHorizontalLay()
Definition: ShuttleGui.cpp:1177
ApplyMacroDialog::PopulateMacros
void PopulateMacros()
Definition: BatchProcessDialog.cpp:190
ApplyMacroDialog::mMacroCommands
MacroCommands mMacroCommands
Definition: BatchProcessDialog.h:54
ProjectFileManager::Get
static ProjectFileManager & Get(AudacityProject &project)
Definition: ProjectFileManager.cpp:66
ShuttleGuiBase::StartHorizontalLay
void StartHorizontalLay(int PositionFlags=wxALIGN_CENTRE, int iProp=1)
Definition: ShuttleGui.cpp:1167
name
const TranslatableString name
Definition: Distortion.cpp:98
WindowAccessible
An alternative to using wxWindowAccessible, which in wxWidgets 3.1.1 contained GetParent() which was ...
ApplyMacroDialog::Populate
void Populate()
Definition: BatchProcessDialog.cpp:114
Importer::SelectDefaultOpenType
static size_t SelectDefaultOpenType(const FileNames::FileTypes &fileTypes)
Definition: Import.cpp:244
MacroCommands::GetNames
static wxArrayString GetNames()
Definition: BatchCommands.cpp:911
ApplyMacroDialog::mMacros
wxListCtrl * mMacros
Definition: BatchProcessDialog.h:53
ShuttleGui::Prop
ShuttleGui & Prop(int iProp)
Definition: ShuttleGui.h:725
ProjectFileManager::CloseProject
void CloseProject()
Definition: ProjectFileManager.cpp:788
ApplyMacroDialog::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S)
Defines the dialog and does data exchange with it.
Definition: BatchProcessDialog.cpp:142
ShuttleGuiBase::AddButton
wxButton * AddButton(const TranslatableString &Text, int PositionFlags=wxALIGN_CENTRE, bool setDefault=false)
Definition: ShuttleGui.cpp:360
Importer::GetFileTypes
FileNames::FileTypes GetFileTypes(const FileNames::FileType &extraType={})
Definition: Import.cpp:179
ShuttleGuiBase::StartStatic
wxStaticBox * StartStatic(const TranslatableString &Str, int iProp=0)
Definition: ShuttleGui.cpp:893
min
int min(int a, int b)
Definition: CompareAudioCommand.cpp:106
ShuttleGui::Name
ShuttleGui & Name(const TranslatableString &name)
Definition: ShuttleGui.h:663
wxDialogWrapper
Definition: wxPanelWrapper.h:81
Clipboard::Get
static Clipboard & Get()
Definition: Clipboard.cpp:29
Clipboard
Definition: Clipboard.h:28
ApplyMacroDialog::mCatalog
const MacroCommandsCatalog mCatalog
Definition: BatchProcessDialog.h:67
FileConfig::Flush
virtual bool Flush(bool bCurrentOnly=false) wxOVERRIDE
Definition: FileConfig.cpp:143
TrackList::Get
static TrackList & Get(AudacityProject &project)
Definition: Track.cpp:506
ProjectWindow::ZoomAfterImport
void ZoomAfterImport(Track *pTrack)
Definition: ProjectWindow.cpp:1551
FileDialogWrapper
Definition: wxPanelWrapper.h:165
names
static TranslatableStrings names
Definition: Tags.cpp:744
ShuttleGuiBase::AddListControlReportMode
wxListCtrl * AddListControlReportMode(std::initializer_list< const ListControlColumn > columns={}, long listControlStyles=0)
Definition: ShuttleGui.cpp:802
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:92
eCloseButton
@ eCloseButton
Definition: ShuttleGui.h:610
Verbatim
TranslatableString Verbatim(wxString str)
Require calls to the one-argument constructor to go through this distinct global function name.
Definition: TranslatableString.h:321
wxDialogWrapper::wxDialogWrapper
wxDialogWrapper()
Definition: wxPanelWrapper.h:84
ProjectFileManager::Import
bool Import(const FilePath &fileName, bool addToHistory=true)
Definition: ProjectFileManager.cpp:1207
ShuttleGui::AddStandardButtons
void AddStandardButtons(long buttons=eOkButton|eCancelButton, wxWindow *extra=NULL)
Definition: ShuttleGui.cpp:2444
SelectUtilities::DoSelectAll
void DoSelectAll(AudacityProject &project)
Definition: SelectUtilities.cpp:139
ApplyMacroDialog::mResize
wxButton * mResize
Provides list of available commands.
Definition: BatchProcessDialog.h:56
ShuttleGuiBase::AddPrompt
void AddPrompt(const TranslatableString &Prompt, int wrapWidth=0)
Right aligned text string.
Definition: ShuttleGui.cpp:238
wxDialogWrapper::SetName
void SetName()
Definition: wxPanelWrapper.cpp:81
ApplyMacroDialog::GetHelpPageName
virtual ManualPageID GetHelpPageName()
Definition: BatchProcessDialog.h:44
ShuttleGuiBase::EndStatic
void EndStatic()
Definition: ShuttleGui.cpp:922
safenew
#define safenew
Definition: MemoryX.h:10
TrackList::empty
bool empty() const
Definition: Track.cpp:995
ApplyMacroDialog::MacroIdOfName
static CommandID MacroIdOfName(const wxString &MacroName)
Definition: BatchProcessDialog.cpp:243
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631