Audacity  2.2.2
EffectsPrefs.cpp
Go to the documentation of this file.
1 /**********************************************************************
2 
3  Audacity: A Digital Audio Editor
4 
5  EffectsPrefs.cpp
6 
7  Brian Gunlogson
8  Joshua Haberman
9  Dominic Mazzoni
10  James Crook
11 
12 
13 *******************************************************************//*******************************************************************/
19 
20 #include "../Audacity.h"
21 
22 #include <wx/choice.h>
23 #include <wx/defs.h>
24 
25 #include "../Languages.h"
26 #include "../PluginManager.h"
27 #include "../Prefs.h"
28 #include "../ShuttleGui.h"
29 
30 #include "EffectsPrefs.h"
31 
32 #include "../Experimental.h"
33 #include "../Internat.h"
34 
35 EffectsPrefs::EffectsPrefs(wxWindow * parent, wxWindowID winid)
36 : PrefsPanel(parent, winid, _("Effects"))
37 {
38  Populate();
39 }
40 
42 {
43 }
44 
46 {
47  //------------------------- Main section --------------------
48  // Now construct the GUI itself.
49  // Use 'eIsCreatingFromPrefs' so that the GUI is
50  // initialised with values from gPrefs.
53  // ----------------------- End of main section --------------
54 }
55 
57 {
58  S.SetBorder(2);
59  S.StartScroller();
60 
61  S.StartStatic(_("Enable Effects"));
62  {
63 
64 #if USE_AUDIO_UNITS
65  S.TieCheckBox(_("Audio Unit"),
66  wxT("/AudioUnit/Enable"),
67  true);
68 #endif
69 
70  // JKC: LADSPA, LV2, Nyquist, VST, VAMP should not be translated.
71 #if USE_LADSPA
72  S.TieCheckBox(wxT("&LADSPA"),
73  wxT("/Ladspa/Enable"),
74  true);
75 #endif
76 
77 #if USE_LV2
78  S.TieCheckBox(wxT("LV&2"),
79  wxT("/LV2/Enable"),
80  true);
81 #endif
82 #if USE_NYQUIST
83  S.TieCheckBox(wxT("N&yquist"),
84  wxT("/Nyquist/Enable"),
85  true);
86 #endif
87 
88 #if USE_VAMP
89  S.TieCheckBox(wxT("&Vamp"),
90  wxT("/VAMP/Enable"),
91  true);
92 #endif
93 
94 #if USE_VST
95  S.TieCheckBox(wxT("V&ST"),
96  wxT("/VST/Enable"),
97  true);
98 #endif
99  }
100  S.EndStatic();
101 
102  S.StartStatic(_("Effect Options"));
103  {
104  S.StartMultiColumn(2);
105  {
106  wxArrayString visualgroups;
107  wxArrayString prefsgroups;
108 
109  visualgroups.Add(_("Sorted by Effect Name"));
110  visualgroups.Add(_("Sorted by Publisher and Effect Name"));
111  visualgroups.Add(_("Sorted by Type and Effect Name"));
112  visualgroups.Add(_("Grouped by Publisher"));
113  visualgroups.Add(_("Grouped by Type"));
114 
115  prefsgroups.Add(wxT("sortby:name"));
116  prefsgroups.Add(wxT("sortby:publisher:name"));
117  prefsgroups.Add(wxT("sortby:type:name"));
118  prefsgroups.Add(wxT("groupby:publisher"));
119  prefsgroups.Add(wxT("groupby:type"));
120 
121  wxChoice *c = S.TieChoice(_("S&ort or Group:"),
122  wxT("/Effects/GroupBy"),
123  wxT("name"),
124  visualgroups,
125  prefsgroups);
126  if( c ) c->SetMinSize(c->GetBestSize());
127 
128  S.TieNumericTextBox(_("&Maximum effects per group (0 to disable):"),
129  wxT("/Effects/MaxPerGroup"),
130 #if defined(__WXGTK__)
131  15,
132 #else
133  0,
134 #endif
135  5);
136  }
137  S.EndMultiColumn();
138  }
139  S.EndStatic();
140 
141 #ifndef EXPERIMENTAL_EFFECT_MANAGEMENT
142  S.StartStatic(_("Plugin Options"));
143  {
144  S.TieCheckBox(_("Check for updated plugins when Audacity starts"),
145  wxT("/Plugins/CheckForUpdates"),
146  true);
147  S.TieCheckBox(_("Rescan plugins next time Audacity is started"),
148  wxT("/Plugins/Rescan"),
149  false);
150  }
151  S.EndStatic();
152 #endif
153 
154 #ifdef EXPERIMENTAL_EQ_SSE_THREADED
155  S.StartStatic(_("Instruction Set"));
156  {
157  S.TieCheckBox(_("&Use SSE/SSE2/.../AVX"),
158  wxT("/SSE/GUI"),
159  true);
160  }
161  S.EndStatic();
162 #endif
163  S.EndScroller();
164 }
165 
167 {
168  ShuttleGui S(this, eIsSavingToPrefs);
170 
171  return true;
172 }
173 
175 {
176  return "Effects_Preferences";
177 }
178 
179 PrefsPanel *EffectsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
180 {
181  wxASSERT(parent); // to justify safenew
182  return safenew EffectsPrefs(parent, winid);
183 }
wxChoice * TieChoice(const wxString &Prompt, WrappedType &WrappedRef, const wxArrayString *pChoices)
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI...
Definition: ShuttleGui.h:409
wxString HelpPageName() override
void PopulateOrExchange(ShuttleGui &S) override
void EndMultiColumn()
A PrefsPanel for general GUI prefernces.
Definition: EffectsPrefs.h:25
void EndScroller()
Definition: ShuttleGui.cpp:828
#define safenew
Definition: Audacity.h:230
bool Commit() override
wxScrolledWindow * StartScroller(int iStyle=0)
Definition: ShuttleGui.cpp:795
void StartMultiColumn(int nCols, int PositionFlags=wxALIGN_LEFT)
wxTextCtrl * TieNumericTextBox(const wxString &Prompt, WrappedType &WrappedRef, const int nChars)
EffectsPrefs(wxWindow *parent, wxWindowID winid)
Used within the PrefsDialog, classes derived from this class include AudioIOPrefs, BatchPrefs, DirectoriesPrefs, FileFormatPrefs, GUIPrefs, KeyConfigPrefs, MousePrefs, QualityPrefs, SpectrumPrefs and ThemePrefs.
Definition: PrefsPanel.h:45
_("Move Track &Down")+wxT("\t")+(GetActiveProject() -> GetCommandManager() ->GetKeyFromName(wxT("TrackMoveDown")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveTopID, _("Move Track to &Top")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveTop")).Raw()), OnMoveTrack) POPUP_MENU_ITEM(OnMoveBottomID, _("Move Track to &Bottom")+wxT("\t")+(GetActiveProject() ->GetCommandManager() ->GetKeyFromName(wxT("TrackMoveBottom")).Raw()), OnMoveTrack)#define SET_TRACK_NAME_PLUGIN_SYMBOLclass SetTrackNameCommand:public AudacityCommand
wxCheckBox * TieCheckBox(const wxString &Prompt, WrappedType &WrappedRef)
wxStaticBox * StartStatic(const wxString &Str, int iProp=0)
Definition: ShuttleGui.cpp:763
PrefsPanel * operator()(wxWindow *parent, wxWindowID winid) override
void SetBorder(int Border)
Definition: ShuttleGui.h:286