Audacity 3.2.0
Namespaces | Macros | Enumerations | Functions | Variables
BatchProcessDialog.cpp File Reference
#include "BatchProcessDialog.h"
#include <wx/setup.h>
#include <wx/ownerdrw.h>
#include <wx/defs.h>
#include <wx/checkbox.h>
#include <wx/choice.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 "ShuttleGui.h"
#include "Menus.h"
#include "Prefs.h"
#include "Project.h"
#include "ProjectFileManager.h"
#include "ProjectHistory.h"
#include "ProjectManager.h"
#include "ProjectWindow.h"
#include "SelectUtilities.h"
#include "Track.h"
#include "commands/CommandManager.h"
#include "effects/Effect.h"
#include "effects/EffectUI.h"
#include "../images/Arrow.xpm"
#include "../images/Empty9x16.xpm"
#include "UndoManager.h"
#include "AllThemeResources.h"
#include "widgets/FileDialog/FileDialog.h"
#include "FileNames.h"
#include "import/Import.h"
#include "widgets/AudacityMessageBox.h"
#include "widgets/AudacityTextEntryDialog.h"
#include "widgets/HelpSystem.h"
#include <wx/textdlg.h>
#include "BatchCommandDialog.h"
#include "CommonCommandFlags.h"
#include "commands/CommandContext.h"
#include "effects/EffectManager.h"
#include "ProjectWindows.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
 

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)
 
MenuTable::BaseItemPtrs anonymous_namespace{BatchProcessDialog.cpp}::PopulateMacrosMenu (CommandFlag flags)
 
const ReservedCommandFlaganonymous_namespace{BatchProcessDialog.cpp}::HasLastToolFlag ()
 
BaseItemSharedPtr PluginMenuItems ()
 
BaseItemSharedPtr ExtraScriptablesIMenu ()
 
BaseItemSharedPtr ExtraScriptablesIIMenu ()
 

Variables

AttachedWindows::RegisteredFactory anonymous_namespace{BatchProcessDialog.cpp}::sMacrosWindowKey
 
AttachedItem sAttachment1
 
AttachedItem sAttachment2
 
AttachedItem sAttachment3
 

Macro Definition Documentation

◆ ApplyToFilesID

#define ApplyToFilesID   7004

Definition at line 78 of file BatchProcessDialog.cpp.

◆ ApplyToProjectID

#define ApplyToProjectID   7003

Definition at line 77 of file BatchProcessDialog.cpp.

◆ CommandsListID

#define CommandsListID   7002

Definition at line 76 of file BatchProcessDialog.cpp.

◆ ExpandID

#define ExpandID   7005

Definition at line 79 of file BatchProcessDialog.cpp.

◆ MacrosListID

#define MacrosListID   7001

Definition at line 75 of file BatchProcessDialog.cpp.

◆ MacrosPaletteTitle

#define MacrosPaletteTitle   XO("Macros Palette")

Definition at line 69 of file BatchProcessDialog.cpp.

◆ ManageMacrosTitle

#define ManageMacrosTitle   XO("Manage Macros")

Definition at line 70 of file BatchProcessDialog.cpp.

◆ ShrinkID

#define ShrinkID   7006

Definition at line 80 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 502 of file BatchProcessDialog.cpp.

502 {
503 AddButtonID = 10000,
510
512
518
519// MacrosListID 7005
520// CommandsListID, 7002
521// Re-Use IDs from ApplyMacroDialog.
524};
#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 557 of file BatchProcessDialog.cpp.

557 {
561};
@ ActionColumn
@ ParamsColumn
@ ItemNumberColumn

Function Documentation

◆ ExtraScriptablesIIMenu()

BaseItemSharedPtr ExtraScriptablesIIMenu ( )

Definition at line 1598 of file BatchProcessDialog.cpp.

1599{
1600 // Less useful to VI users.
1601 static BaseItemSharedPtr menu{
1602 // i18n-hint: Scriptables are commands normally used from Python, Perl etc.
1603 Menu( wxT("Scriptables2"), XXO("Scripta&bles II") )
1604 };
1605 return menu;
1606}
wxT("CloseDown"))
XXO("&Cut/Copy/Paste Toolbar")
std::unique_ptr< MenuItem > Menu(const Identifier &internalName, const TranslatableString &title, Args &&... args)
std::shared_ptr< BaseItem > BaseItemSharedPtr
Definition: Registry.h:72

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

Here is the call graph for this function:

◆ ExtraScriptablesIMenu()

BaseItemSharedPtr ExtraScriptablesIMenu ( )

Definition at line 1583 of file BatchProcessDialog.cpp.

1584{
1585 // These are the more useful to VI user Scriptables.
1586 static BaseItemSharedPtr menu{
1587 // i18n-hint: Scriptables are commands normally used from Python, Perl etc.
1588 Menu( wxT("Scriptables1"), XXO("Script&ables I") )
1589 };
1590 return menu;
1591}

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

Here is the call graph for this function:

◆ PluginMenuItems()

BaseItemSharedPtr PluginMenuItems ( )

Definition at line 1532 of file BatchProcessDialog.cpp.

1533{
1535 static BaseItemSharedPtr items{
1536 Items( "",
1537 Section( "RepeatLast",
1538 // Delayed evaluation:
1539 [](AudacityProject &project)
1540 {
1541 const auto &lastTool = MenuManager::Get(project).mLastTool;
1542 TranslatableString buildMenuLabel;
1543 if (!lastTool.empty())
1544 buildMenuLabel = XO("Repeat %s")
1545 .Format( EffectManager::Get().GetCommandName(lastTool) );
1546 else
1547 buildMenuLabel = XO("Repeat Last Tool");
1548
1549 return Command( wxT("RepeatLastTool"), buildMenuLabel,
1553 Options{}.IsGlobal() );
1554 }
1555 ),
1556
1557 Command( wxT("ManageMacros"), XXO("&Macro Manager"),
1559
1560 Menu( wxT("Macros"), XXO("&Apply Macro"),
1561 // Palette has no access key to ensure first letter navigation of
1562 // sub menu
1563 Section( "",
1564 Command( wxT("ApplyMacrosPalette"), XXO("Palette..."),
1566 ),
1567
1568 Section( "",
1569 // Delayed evaluation:
1570 [](AudacityProject&)
1571 { return Items( wxEmptyString, PopulateMacrosMenu( AudioIONotBusyFlag() ) ); }
1572 )
1573 )
1574 ) };
1575 return items;
1576}
const ReservedCommandFlag & AudioIONotBusyFlag()
XO("Cut/Copy/Paste")
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
static EffectManager & Get()
PluginID mLastTool
Definition: Menus.h:56
static MenuManager & Get(AudacityProject &project)
Definition: Menus.cpp:69
Holds a msgid for the translation catalog; may also bind format arguments.
std::unique_ptr< MenuPart > Section(const Identifier &internalName, Args &&... args)
std::unique_ptr< MenuItems > Items(const Identifier &internalName, Args &&... args)
std::unique_ptr< CommandItem > Command(const CommandID &name, const TranslatableString &label_in, void(Handler::*pmf)(const CommandContext &), CommandFlag flags, const CommandManager::Options &options={}, CommandHandlerFinder finder=FinderScope::DefaultFinder())
void OnRepeatLastTool(const CommandContext &context)
void OnApplyMacrosPalette(const CommandContext &context)
void OnManageMacros(const CommandContext &context)
MenuTable::BaseItemPtrs PopulateMacrosMenu(CommandFlag flags)
Options && IsGlobal() &&

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

Here is the call graph for this function:

Variable Documentation

◆ sAttachment1

AttachedItem sAttachment1
Initial value:
{
wxT("Tools/Manage"),
}
BaseItemSharedPtr PluginMenuItems()

Definition at line 1578 of file BatchProcessDialog.cpp.

◆ sAttachment2

AttachedItem sAttachment2
Initial value:
{
wxT("Optional/Extra/Part2"),
}
BaseItemSharedPtr ExtraScriptablesIMenu()

Definition at line 1593 of file BatchProcessDialog.cpp.

◆ sAttachment3

AttachedItem sAttachment3
Initial value:
{
wxT("Optional/Extra/Part2"),
}
BaseItemSharedPtr ExtraScriptablesIIMenu()

Definition at line 1608 of file BatchProcessDialog.cpp.