Audacity  3.0.3
BatchPrefs.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  BatchPrefs.cpp
6 
7  Dominic Mazzoni
8  James Crook
9 
10 *******************************************************************//*******************************************************************/
16 
17 
18 #include "BatchPrefs.h"
19 
20 #include <wx/defs.h>
21 #include <wx/intl.h>
22 #include <wx/textdlg.h>
23 
24 #include "Languages.h"
25 #include "../Prefs.h"
26 #include "../ShuttleGui.h"
27 
28 BEGIN_EVENT_TABLE(BatchPrefs, PrefsPanel)
30 
31 BatchPrefs::BatchPrefs(wxWindow * parent, wxWindowID winid):
33  PrefsPanel(parent, winid, XO("Batch"))
34 {
35  Populate();
36 }
37 
39 {
41 }
42 
44 {
45  return XO("Preferences for Batch");
46 }
47 
49 {
50  return "Batch_Preferences";
51 }
52 
55 {
56  //------------------------- Main section --------------------
57  // Now construct the GUI itself.
58  // Use 'eIsCreatingFromPrefs' so that the GUI is
59  // initialised with values from gPrefs.
62  // ----------------------- End of main section --------------
63 }
64 
67 {
68  S.SetBorder( 2 );
69  S.StartScroller();
70  S.StartHorizontalLay( wxEXPAND, 0 );
71 
72  S.StartStatic( XO("Behaviors"),1 );
73  {
74 #ifdef _DEBUG
75  S.TieCheckBox( XXO("&Don't apply effects in batch mode"),
76  {wxT("/Batch/Debug"), false});
77 #endif
78  }
79  S.EndStatic();
80  S.EndHorizontalLay();
81  S.EndScroller();
82  return;
83 }
84 
87 {
88  ShuttleGui S( this, eIsSavingToPrefs );
89  PopulateOrExchange( S );
90 
91  return true;
92 }
93 
95 {
96 }
97 
98 #if 0
99 namespace{
101  [](wxWindow *parent, wxWindowID winid, AudacityProject *)
102  {
103  wxASSERT(parent); // to justify safenew
104  return safenew BatchPrefs(parent, winid);
105  },
106  false,
107  // Register with an explicit ordering hint because this one is
108  // only conditionally compiled
109  { "", { Registry::OrderingHint::Before, "KeyConfig" } }
110 };
111 }
112 #endif
TranslatableString
Holds a msgid for the translation catalog; may also bind format arguments.
Definition: TranslatableString.h:32
BatchPrefs::HelpPageName
wxString HelpPageName() override
Definition: BatchPrefs.cpp:48
ShuttleGuiBase::TieCheckBox
wxCheckBox * TieCheckBox(const TranslatableString &Prompt, bool &Var)
Definition: ShuttleGui.cpp:1603
BatchPrefs::Populate
void Populate()
Creates the dialog and its contents.
Definition: BatchPrefs.cpp:54
PrefsPanel::Registration
Definition: PrefsPanel.h:84
XO
#define XO(s)
Definition: Internat.h:31
BatchPrefs::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Defines the dialog and does data exchange with it.
Definition: BatchPrefs.cpp:66
ComponentInterfaceSymbol
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
Definition: ComponentInterface.h:61
ShuttleGuiBase::EndScroller
void EndScroller()
Definition: ShuttleGui.cpp:964
BatchPrefs::~BatchPrefs
~BatchPrefs()
Definition: BatchPrefs.cpp:94
XXO
#define XXO(s)
Definition: Internat.h:44
ShuttleGuiBase::StartScroller
wxScrolledWindow * StartScroller(int iStyle=0)
Definition: ShuttleGui.cpp:931
ShuttleGuiBase::EndHorizontalLay
void EndHorizontalLay()
Definition: ShuttleGui.cpp:1170
BatchPrefs.h
ShuttleGuiBase::StartHorizontalLay
void StartHorizontalLay(int PositionFlags=wxALIGN_CENTRE, int iProp=1)
Definition: ShuttleGui.cpp:1160
BatchPrefs::Commit
bool Commit() override
Send changed values back to Prefs, and update Audacity.
Definition: BatchPrefs.cpp:86
anonymous_namespace{Contrast.cpp}::sAttachment
AttachedItem sAttachment
Definition: Contrast.cpp:696
Languages.h
Registry::OrderingHint::Before
@ Before
Definition: Registry.h:29
BATCH_PREFS_PLUGIN_SYMBOL
#define BATCH_PREFS_PLUGIN_SYMBOL
Definition: BatchPrefs.h:21
ShuttleGuiBase::StartStatic
wxStaticBox * StartStatic(const TranslatableString &Str, int iProp=0)
Definition: ShuttleGui.cpp:886
eIsSavingToPrefs
@ eIsSavingToPrefs
Definition: ShuttleGui.h:47
BatchPrefs::GetDescription
TranslatableString GetDescription() override
Definition: BatchPrefs.cpp:43
AudacityProject
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:112
PrefsPanel
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
Definition: PrefsPanel.h:51
ShuttleGuiBase::SetBorder
void SetBorder(int Border)
Definition: ShuttleGui.h:484
eIsCreatingFromPrefs
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:46
ShuttleGuiBase::EndStatic
void EndStatic()
Definition: ShuttleGui.cpp:915
safenew
#define safenew
Definition: MemoryX.h:10
BatchPrefs::GetSymbol
ComponentInterfaceSymbol GetSymbol() override
Definition: BatchPrefs.cpp:38
END_EVENT_TABLE
END_EVENT_TABLE()
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:625
BatchPrefs
A probably unused PrefsPanel that in debug builds could offer a setting used in debugging batch (aka ...
Definition: BatchPrefs.h:24