Audacity 3.2.0
Namespaces | Macros | Typedefs | Enumerations | Functions | Variables
BatchProcessDialog.cpp File Reference
#include "BatchProcessDialog.h"
#include "DoEffect.h"
#include <wx/setup.h>
#include <wx/ownerdrw.h>
#include <wx/defs.h>
#include <wx/checkbox.h>
#include <wx/choice.h>
#include <wx/frame.h>
#include <wx/log.h>
#include <wx/statbox.h>
#include <wx/stattext.h>
#include <wx/textctrl.h>
#include <wx/listctrl.h>
#include <wx/button.h>
#include <wx/imaglist.h>
#include <wx/settings.h>
#include "Clipboard.h"
#include "PluginManager.h"
#include "ShuttleGui.h"
#include "MenuCreator.h"
#include "Prefs.h"
#include "Project.h"
#include "ProjectFileManager.h"
#include "ProjectHistory.h"
#include "ProjectManager.h"
#include "ProjectWindows.h"
#include "SelectUtilities.h"
#include "Track.h"
#include "CommandManager.h"
#include "Effect.h"
#include "effects/EffectUI.h"
#include "../images/Arrow.xpm"
#include "../images/Empty9x16.xpm"
#include "UndoManager.h"
#include "Viewport.h"
#include "AllThemeResources.h"
#include "FileDialog/FileDialog.h"
#include "FileNames.h"
#include "Import.h"
#include "AudacityMessageBox.h"
#include "AudacityTextEntryDialog.h"
#include "HelpSystem.h"
#include <wx/textdlg.h>
#include "BatchCommandDialog.h"
#include "CommonCommandFlags.h"
#include "CommandContext.h"
Include dependency graph for BatchProcessDialog.cpp:

Go to the source code of this file.

Namespaces

namespace  anonymous_namespace{BatchProcessDialog.cpp}
 

Macros

#define MacrosPaletteTitle   XO("Macros Palette")
 
#define ManageMacrosTitle   XO("Manage Macros")
 
#define MacrosListID   7001
 
#define CommandsListID   7002
 
#define ApplyToProjectID   7003
 
#define ApplyToFilesID   7004
 
#define ExpandID   7005
 
#define ShrinkID   7006
 

Typedefs

using anonymous_namespace{BatchProcessDialog.cpp}::MacroID = wxString
 

Enumerations

enum  {
  AddButtonID = 10000 , RemoveButtonID , RenameButtonID , RestoreButtonID ,
  ImportButtonID , ExportButtonID , SaveButtonID , DefaultsButtonID ,
  InsertButtonID , EditButtonID , DeleteButtonID , UpButtonID ,
  DownButtonID , ApplyToProjectButtonID = ApplyToProjectID , ApplyToFilesButtonID = ApplyToFilesID
}
 
enum  { ItemNumberColumn , ActionColumn , ParamsColumn }
 

Functions

void anonymous_namespace{BatchProcessDialog.cpp}::OnApplyMacroDirectlyByName (const CommandContext &context, const MacroID &Name)
 
void anonymous_namespace{BatchProcessDialog.cpp}::OnRepeatLastTool (const CommandContext &context)
 
void anonymous_namespace{BatchProcessDialog.cpp}::OnManageMacros (const CommandContext &context)
 
void anonymous_namespace{BatchProcessDialog.cpp}::OnApplyMacrosPalette (const CommandContext &context)
 
void anonymous_namespace{BatchProcessDialog.cpp}::OnApplyMacroDirectly (const CommandContext &context)
 
void anonymous_namespace{BatchProcessDialog.cpp}::PopulateMacrosMenu (MenuRegistry::MenuItems &items, CommandFlag flags)
 
const ReservedCommandFlaganonymous_namespace{BatchProcessDialog.cpp}::HasLastToolFlag ()
 
auto PluginMenuItems ()
 
auto ExtraScriptablesIMenu ()
 
auto ExtraScriptablesIIMenu ()
 

Variables

AttachedWindows::RegisteredFactory anonymous_namespace{BatchProcessDialog.cpp}::sMacrosWindowKey
 
AttachedItem sAttachment1 { Indirect(PluginMenuItems()), wxT("Tools/Manage") }
 
AttachedItem sAttachment2
 
AttachedItem sAttachment3
 

Macro Definition Documentation

◆ ApplyToFilesID

#define ApplyToFilesID   7004

Definition at line 81 of file BatchProcessDialog.cpp.

◆ ApplyToProjectID

#define ApplyToProjectID   7003

Definition at line 80 of file BatchProcessDialog.cpp.

◆ CommandsListID

#define CommandsListID   7002

Definition at line 79 of file BatchProcessDialog.cpp.

◆ ExpandID

#define ExpandID   7005

Definition at line 82 of file BatchProcessDialog.cpp.

◆ MacrosListID

#define MacrosListID   7001

Definition at line 78 of file BatchProcessDialog.cpp.

◆ MacrosPaletteTitle

#define MacrosPaletteTitle   XO("Macros Palette")

Definition at line 72 of file BatchProcessDialog.cpp.

◆ ManageMacrosTitle

#define ManageMacrosTitle   XO("Manage Macros")

Definition at line 73 of file BatchProcessDialog.cpp.

◆ ShrinkID

#define ShrinkID   7006

Definition at line 83 of file BatchProcessDialog.cpp.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
AddButtonID 
RemoveButtonID 
RenameButtonID 
RestoreButtonID 
ImportButtonID 
ExportButtonID 
SaveButtonID 
DefaultsButtonID 
InsertButtonID 
EditButtonID 
DeleteButtonID 
UpButtonID 
DownButtonID 
ApplyToProjectButtonID 
ApplyToFilesButtonID 

Definition at line 505 of file BatchProcessDialog.cpp.

505 {
506 AddButtonID = 10000,
513
515
521
522// MacrosListID 7005
523// CommandsListID, 7002
524// Re-Use IDs from ApplyMacroDialog.
527};
#define ApplyToFilesID
#define ApplyToProjectID
@ SaveButtonID
@ UpButtonID
@ ImportButtonID
@ DownButtonID
@ RestoreButtonID
@ RenameButtonID
@ AddButtonID
@ EditButtonID
@ DefaultsButtonID
@ RemoveButtonID
@ ApplyToProjectButtonID
@ DeleteButtonID
@ InsertButtonID
@ ApplyToFilesButtonID
@ ExportButtonID

◆ anonymous enum

anonymous enum
Enumerator
ItemNumberColumn 
ActionColumn 
ParamsColumn 

Definition at line 560 of file BatchProcessDialog.cpp.

560 {
564};
@ ActionColumn
@ ParamsColumn
@ ItemNumberColumn

Function Documentation

◆ ExtraScriptablesIIMenu()

auto ExtraScriptablesIIMenu ( )

Definition at line 1606 of file BatchProcessDialog.cpp.

1607{
1608 // Less useful to VI users.
1609 static auto menu = std::shared_ptr{
1610 // i18n-hint: Scriptables are commands normally used from Python, Perl etc.
1611 Menu( wxT("Scriptables2"), XXO("Scripta&bles II") )
1612 };
1613 return menu;
1614}
wxT("CloseDown"))
XXO("&Cut/Copy/Paste Toolbar")
constexpr auto Menu
Items will appear in a main toolbar menu or in a sub-menu.
Definition: MenuRegistry.h:445

References MenuRegistry::Menu, wxT(), and XXO().

Here is the call graph for this function:

◆ ExtraScriptablesIMenu()

auto ExtraScriptablesIMenu ( )

Definition at line 1592 of file BatchProcessDialog.cpp.

1593{
1594 // These are the more useful to VI user Scriptables.
1595 static auto menu = std::shared_ptr{
1596 // i18n-hint: Scriptables are commands normally used from Python, Perl etc.
1597 Menu( wxT("Scriptables1"), XXO("Script&ables I") )
1598 };
1599 return menu;
1600}

References MenuRegistry::Menu, wxT(), and XXO().

Here is the call graph for this function:

◆ PluginMenuItems()

auto PluginMenuItems ( )

Definition at line 1541 of file BatchProcessDialog.cpp.

1542{
1543 static auto items = std::shared_ptr{
1544 Items( "Macros",
1545 Section( "RepeatLast",
1546 // Delayed evaluation:
1548 {
1549 const auto &lastTool = CommandManager::Get(project).mLastTool;
1550 TranslatableString buildMenuLabel;
1551 if (!lastTool.empty())
1552 buildMenuLabel =
1553 XO("Repeat %s")
1554 .Format(PluginManager::Get().GetName(lastTool));
1555 else
1556 buildMenuLabel = XO("Repeat Last Tool");
1557
1558 return Command( wxT("RepeatLastTool"), buildMenuLabel,
1562 Options{}.IsGlobal() );
1563 }
1564 ),
1565
1566 Command( wxT("ManageMacros"), XXO("&Macro Manager"),
1568
1569 Menu( wxT("Macros"), XXO("&Apply Macro"),
1570 // Palette has no access key to ensure first letter navigation of
1571 // sub menu
1572 Section( "",
1573 Command( wxT("ApplyMacrosPalette"), XXO("Palette..."),
1575 ),
1576
1577 Section( "",
1578 // Delayed evaluation:
1579 [](AudacityProject&) {
1580 auto result = Items("");
1582 return result;
1583 }
1584 )
1585 )
1586 ) };
1587 return items;
1588}
const ReservedCommandFlag & AudioIONotBusyFlag()
XO("Cut/Copy/Paste")
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
PluginID mLastTool
static CommandManager & Get(AudacityProject &project)
static PluginManager & Get()
Holds a msgid for the translation catalog; may also bind format arguments.
constexpr auto Section
Definition: MenuRegistry.h:436
constexpr auto Items
Definition: MenuRegistry.h:427
constexpr auto Command
Definition: MenuRegistry.h:456
void OnRepeatLastTool(const CommandContext &context)
void OnApplyMacrosPalette(const CommandContext &context)
void OnManageMacros(const CommandContext &context)
void PopulateMacrosMenu(MenuRegistry::MenuItems &items, CommandFlag flags)
Options && IsGlobal() &&
Definition: MenuRegistry.h:56

References AudioIONotBusyFlag(), MenuRegistry::Command, PluginManager::Get(), CommandManager::Get(), anonymous_namespace{BatchProcessDialog.cpp}::HasLastToolFlag(), MenuRegistry::Options::IsGlobal(), MenuRegistry::Items, MenuRegistry::Menu, CommandManager::mLastTool, anonymous_namespace{BatchProcessDialog.cpp}::OnApplyMacrosPalette(), anonymous_namespace{BatchProcessDialog.cpp}::OnManageMacros(), anonymous_namespace{BatchProcessDialog.cpp}::OnRepeatLastTool(), anonymous_namespace{BatchProcessDialog.cpp}::PopulateMacrosMenu(), project, MenuRegistry::Section, wxT(), XO(), and XXO().

Here is the call graph for this function:

Variable Documentation

◆ sAttachment1

AttachedItem sAttachment1 { Indirect(PluginMenuItems()), wxT("Tools/Manage") }

Definition at line 1590 of file BatchProcessDialog.cpp.

◆ sAttachment2

AttachedItem sAttachment2
Initial value:
wxT("Optional/Extra/Part2")
}
auto ExtraScriptablesIMenu()
std::unique_ptr< detail::IndirectItem< Item > > Indirect(const std::shared_ptr< Item > &ptr)
A convenience function.
Definition: Registry.h:175

Definition at line 1602 of file BatchProcessDialog.cpp.

◆ sAttachment3

AttachedItem sAttachment3
Initial value:
wxT("Optional/Extra/Part2")
}
auto ExtraScriptablesIIMenu()

Definition at line 1616 of file BatchProcessDialog.cpp.