Audacity  3.0.3
Public Member Functions | Private Member Functions | List of all members
BatchPrefs Class Referencefinal

A probably unused PrefsPanel that in debug builds could offer a setting used in debugging batch (aka macros) processing. More...

#include <BatchPrefs.h>

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

Public Member Functions

 BatchPrefs (wxWindow *parent, wxWindowID winid)
 Constructor. More...
 
 ~BatchPrefs ()
 
ComponentInterfaceSymbol GetSymbol () override
 
TranslatableString GetDescription () override
 
ManualPageID HelpPageName () override
 If not empty string, the Help button is added below the panel. More...
 
bool Commit () override
 Send changed values back to Prefs, and update Audacity. More...
 
void PopulateOrExchange (ShuttleGui &S) override
 Defines the dialog and does data exchange with it. More...
 
- Public Member Functions inherited from PrefsPanel
 PrefsPanel (wxWindow *parent, wxWindowID winid, const TranslatableString &title)
 
virtual ~PrefsPanel ()
 
virtual void Preview ()
 
virtual PluginPath GetPath ()
 
virtual VendorSymbol GetVendor ()
 
virtual wxString GetVersion ()
 
virtual bool ShowsPreviewButton ()
 
virtual void PopulateOrExchange (ShuttleGui &WXUNUSED(S))
 
virtual void Cancel ()
 
- Public Member Functions inherited from wxPanelWrapper
 wxPanelWrapper ()
 
 wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
bool Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel"))
 
void SetLabel (const TranslatableString &label)
 
void SetName (const TranslatableString &name)
 
void SetToolTip (const TranslatableString &toolTip)
 
void SetName ()
 
- Public Member Functions inherited from wxTabTraversalWrapper< wxPanel >
 wxTabTraversalWrapper (Args &&... args)
 
 wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete
 
 wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete
 
wxTabTraversalWrapperoperator= (const wxTabTraversalWrapper &)=delete
 
wxTabTraversalWrapperoperator= (wxTabTraversalWrapper &&)=delete
 

Private Member Functions

void Populate ()
 Creates the dialog and its contents. More...
 

Additional Inherited Members

- Public Types inherited from PrefsPanel
using Factories = std::vector< PrefsPanel::PrefsNode >
 
using Factory = std::function< PrefsPanel *(wxWindow *parent, wxWindowID winid, AudacityProject *) >
 
- Static Public Member Functions inherited from PrefsPanel
static FactoriesDefaultFactories ()
 

Detailed Description

A probably unused PrefsPanel that in debug builds could offer a setting used in debugging batch (aka macros) processing.

Definition at line 23 of file BatchPrefs.h.

Constructor & Destructor Documentation

◆ BatchPrefs()

BatchPrefs::BatchPrefs ( wxWindow *  parent,
wxWindowID  winid 
)

Constructor.

Definition at line 32 of file BatchPrefs.cpp.

32  :
33  PrefsPanel(parent, winid, XO("Batch"))
34 {
35  Populate();
36 }

◆ ~BatchPrefs()

BatchPrefs::~BatchPrefs ( )

Definition at line 94 of file BatchPrefs.cpp.

95 {
96 }

Member Function Documentation

◆ Commit()

bool BatchPrefs::Commit ( )
overridevirtual

Send changed values back to Prefs, and update Audacity.

Implements PrefsPanel.

Definition at line 86 of file BatchPrefs.cpp.

87 {
88  ShuttleGui S( this, eIsSavingToPrefs );
89  PopulateOrExchange( S );
90 
91  return true;
92 }

References eIsSavingToPrefs, and PopulateOrExchange().

Here is the call graph for this function:

◆ GetDescription()

TranslatableString BatchPrefs::GetDescription ( )
overridevirtual

Implements ComponentInterface.

Definition at line 43 of file BatchPrefs.cpp.

44 {
45  return XO("Preferences for Batch");
46 }

References XO.

◆ GetSymbol()

ComponentInterfaceSymbol BatchPrefs::GetSymbol ( )
overridevirtual

Implements ComponentInterface.

Definition at line 38 of file BatchPrefs.cpp.

39 {
41 }

References BATCH_PREFS_PLUGIN_SYMBOL.

◆ HelpPageName()

ManualPageID BatchPrefs::HelpPageName ( )
overridevirtual

If not empty string, the Help button is added below the panel.

Default returns empty string.

Reimplemented from PrefsPanel.

Definition at line 48 of file BatchPrefs.cpp.

49 {
50  return "Batch_Preferences";
51 }

◆ Populate()

void BatchPrefs::Populate ( )
private

Creates the dialog and its contents.

Definition at line 54 of file BatchPrefs.cpp.

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 }

References eIsCreatingFromPrefs, and PopulateOrExchange().

Here is the call graph for this function:

◆ PopulateOrExchange()

void BatchPrefs::PopulateOrExchange ( ShuttleGui S)
override

Defines the dialog and does data exchange with it.

Definition at line 66 of file BatchPrefs.cpp.

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 }

References ShuttleGuiBase::EndHorizontalLay(), ShuttleGuiBase::EndScroller(), ShuttleGuiBase::EndStatic(), ShuttleGuiBase::SetBorder(), ShuttleGuiBase::StartHorizontalLay(), ShuttleGuiBase::StartScroller(), ShuttleGuiBase::StartStatic(), ShuttleGuiBase::TieCheckBox(), XO, and XXO.

Referenced by Commit(), and Populate().

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

The documentation for this class was generated from the following files:
ShuttleGuiBase::TieCheckBox
wxCheckBox * TieCheckBox(const TranslatableString &Prompt, bool &Var)
Definition: ShuttleGui.cpp:1629
BatchPrefs::Populate
void Populate()
Creates the dialog and its contents.
Definition: BatchPrefs.cpp:54
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
ShuttleGuiBase::EndScroller
void EndScroller()
Definition: ShuttleGui.cpp:971
XXO
#define XXO(s)
Definition: Internat.h:44
ShuttleGuiBase::StartScroller
wxScrolledWindow * StartScroller(int iStyle=0)
Definition: ShuttleGui.cpp:938
ShuttleGuiBase::EndHorizontalLay
void EndHorizontalLay()
Definition: ShuttleGui.cpp:1177
ShuttleGuiBase::StartHorizontalLay
void StartHorizontalLay(int PositionFlags=wxALIGN_CENTRE, int iProp=1)
Definition: ShuttleGui.cpp:1167
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:893
eIsSavingToPrefs
@ eIsSavingToPrefs
Definition: ShuttleGui.h:48
ShuttleGuiBase::SetBorder
void SetBorder(int Border)
Definition: ShuttleGui.h:489
eIsCreatingFromPrefs
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:47
ShuttleGuiBase::EndStatic
void EndStatic()
Definition: ShuttleGui.cpp:922
ShuttleGui
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:631
PrefsPanel::PrefsPanel
PrefsPanel(wxWindow *parent, wxWindowID winid, const TranslatableString &title)
Definition: PrefsPanel.h:90