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

A PrefsPanel for general GUI preferences. More...

#include <EffectsPrefs.h>

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

Public Member Functions

 EffectsPrefs (wxWindow *parent, wxWindowID winid)
 
 ~EffectsPrefs ()
 
ComponentInterfaceSymbol GetSymbol () override
 
TranslatableString GetDescription () override
 
bool Commit () override
 
ManualPageID HelpPageName () override
 If not empty string, the Help button is added below the panel. More...
 
void PopulateOrExchange (ShuttleGui &S) override
 
- 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 ()
 

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 PrefsPanel for general GUI preferences.

Definition at line 25 of file EffectsPrefs.h.

Constructor & Destructor Documentation

◆ EffectsPrefs()

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

Definition at line 31 of file EffectsPrefs.cpp.

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

References Populate().

Here is the call graph for this function:

◆ ~EffectsPrefs()

EffectsPrefs::~EffectsPrefs ( )

Definition at line 37 of file EffectsPrefs.cpp.

38 {
39 }

Member Function Documentation

◆ Commit()

bool EffectsPrefs::Commit ( )
overridevirtual

Implements PrefsPanel.

Definition at line 241 of file EffectsPrefs.cpp.

242 {
243  ShuttleGui S(this, eIsSavingToPrefs);
245 
246  return true;
247 }

References eIsSavingToPrefs, and PopulateOrExchange().

Here is the call graph for this function:

◆ GetDescription()

TranslatableString EffectsPrefs::GetDescription ( )
overridevirtual

Implements ComponentInterface.

Definition at line 46 of file EffectsPrefs.cpp.

47 {
48  return XO("Preferences for Effects");
49 }

References XO.

◆ GetSymbol()

ComponentInterfaceSymbol EffectsPrefs::GetSymbol ( )
overridevirtual

Implements ComponentInterface.

Definition at line 41 of file EffectsPrefs.cpp.

42 {
44 }

References EFFECTS_PREFS_PLUGIN_SYMBOL.

◆ HelpPageName()

ManualPageID EffectsPrefs::HelpPageName ( )
overridevirtual

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

Default returns empty string.

Reimplemented from PrefsPanel.

Definition at line 51 of file EffectsPrefs.cpp.

52 {
53  return "Effects_Preferences";
54 }

◆ Populate()

void EffectsPrefs::Populate ( )
private

Definition at line 56 of file EffectsPrefs.cpp.

57 {
58  //------------------------- Main section --------------------
59  // Now construct the GUI itself.
60  // Use 'eIsCreatingFromPrefs' so that the GUI is
61  // initialised with values from gPrefs.
64  // ----------------------- End of main section --------------
65 }

References eIsCreatingFromPrefs, and PopulateOrExchange().

Referenced by EffectsPrefs().

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

◆ PopulateOrExchange()

void EffectsPrefs::PopulateOrExchange ( ShuttleGui S)
override

Definition at line 176 of file EffectsPrefs.cpp.

177 {
178  S.SetBorder(2);
179  S.StartScroller();
180 
181  S.StartStatic(XO("Enable Effects"));
182  {
183  for ( const auto &entry : GetModuleData() )
184  {
185  S.TieCheckBox(
186  entry.prompt,
187  {entry.setting,
188  true}
189  );
190  }
191  }
192  S.EndStatic();
193 
194  S.StartStatic(XO("Effect Options"));
195  {
196  S.StartMultiColumn(2);
197  {
198  wxChoice *c = S
199  .MinSize()
200  .TieChoice( XXO("S&ort or Group:"), EffectsGroupBy);
201 
202  S.TieIntegerTextBox(XXO("&Maximum effects per group (0 to disable):"),
203  {wxT("/Effects/MaxPerGroup"),
204 #if defined(__WXGTK__)
205  15
206 #else
207  0
208 #endif
209  },
210  5);
211  }
212  S.EndMultiColumn();
213  }
214  S.EndStatic();
215 
216 #ifndef EXPERIMENTAL_EFFECT_MANAGEMENT
217  S.StartStatic(XO("Plugin Options"));
218  {
219  S.TieCheckBox(XXO("Check for updated plugins when Audacity starts"),
220  {wxT("/Plugins/CheckForUpdates"),
221  true});
222  S.TieCheckBox(XXO("Rescan plugins next time Audacity is started"),
223  {wxT("/Plugins/Rescan"),
224  false});
225  }
226  S.EndStatic();
227 #endif
228 
229 #ifdef EXPERIMENTAL_EQ_SSE_THREADED
230  S.StartStatic(XO("Instruction Set"));
231  {
232  S.TieCheckBox(XXO("&Use SSE/SSE2/.../AVX"),
233  {wxT("/SSE/GUI"),
234  true});
235  }
236  S.EndStatic();
237 #endif
238  S.EndScroller();
239 }

References EffectsGroupBy, ShuttleGuiBase::EndMultiColumn(), ShuttleGuiBase::EndScroller(), ShuttleGuiBase::EndStatic(), entry, anonymous_namespace{EffectsPrefs.cpp}::GetModuleData(), ShuttleGui::MinSize(), ShuttleGuiBase::SetBorder(), ShuttleGuiBase::StartMultiColumn(), ShuttleGuiBase::StartScroller(), ShuttleGuiBase::StartStatic(), ShuttleGuiBase::TieCheckBox(), ShuttleGuiBase::TieChoice(), ShuttleGuiBase::TieIntegerTextBox(), 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
EffectsPrefs::PopulateOrExchange
void PopulateOrExchange(ShuttleGui &S) override
Definition: EffectsPrefs.cpp:176
entry
static ProjectFileIORegistry::WriterEntry entry
Definition: ProjectSettings.cpp:193
EffectsPrefs::Populate
void Populate()
Definition: EffectsPrefs.cpp:56
ShuttleGui::MinSize
ShuttleGui & MinSize()
Definition: ShuttleGui.h:733
XO
#define XO(s)
Definition: Internat.h:31
ShuttleGuiBase::EndMultiColumn
void EndMultiColumn()
Definition: ShuttleGui.cpp:1238
ShuttleGuiBase::EndScroller
void EndScroller()
Definition: ShuttleGui.cpp:971
EFFECTS_PREFS_PLUGIN_SYMBOL
#define EFFECTS_PREFS_PLUGIN_SYMBOL
Definition: EffectsPrefs.h:23
XXO
#define XXO(s)
Definition: Internat.h:44
ShuttleGuiBase::StartScroller
wxScrolledWindow * StartScroller(int iStyle=0)
Definition: ShuttleGui.cpp:938
ShuttleGuiBase::StartMultiColumn
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
Definition: ShuttleGui.cpp:1229
ShuttleGuiBase::StartStatic
wxStaticBox * StartStatic(const TranslatableString &Str, int iProp=0)
Definition: ShuttleGui.cpp:893
eIsSavingToPrefs
@ eIsSavingToPrefs
Definition: ShuttleGui.h:48
ShuttleGuiBase::TieIntegerTextBox
virtual wxTextCtrl * TieIntegerTextBox(const TranslatableString &Prompt, const IntSetting &Setting, const int nChars)
Definition: ShuttleGui.cpp:1932
anonymous_namespace{EffectsPrefs.cpp}::GetModuleData
static const std::vector< Entry > & GetModuleData()
Definition: EffectsPrefs.cpp:135
ShuttleGuiBase::SetBorder
void SetBorder(int Border)
Definition: ShuttleGui.h:489
eIsCreatingFromPrefs
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:47
ShuttleGuiBase::EndStatic
void EndStatic()
Definition: ShuttleGui.cpp:922
ShuttleGuiBase::TieChoice
wxChoice * TieChoice(const TranslatableString &Prompt, TranslatableString &Selected, const TranslatableStrings &choices)
Definition: ShuttleGui.cpp:1727
EffectsGroupBy
ChoiceSetting EffectsGroupBy
Definition: EffectsPrefs.cpp:67
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