Audacity 3.2.0
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
21#include "EffectsPrefs.h"
22
23#include <wx/choice.h>
24#include <wx/defs.h>
25#include <wx/button.h>
26
27#include "PluginManager.h"
29#include "MenuCreator.h"
30#include "Prefs.h"
31#include "ShuttleGui.h"
32
33EffectsPrefs::EffectsPrefs(wxWindow * parent, wxWindowID winid)
34: PrefsPanel(parent, winid, XO("Effects"))
35{
36 Populate();
37}
38
40{
41}
42
44{
46}
47
49{
50 return XO("Preferences for Effects");
51}
52
54{
55 return "Effects_Preferences";
56}
57
59{
60 //------------------------- Main section --------------------
61 // Now construct the GUI itself.
62 // Use 'eIsCreatingFromPrefs' so that the GUI is
63 // initialised with values from gPrefs.
66 // ----------------------- End of main section --------------
67}
68
71 {
72 XO("Sort by effect name") ,
73 XO("Sort by publisher and effect name") ,
74 XO("Sort by type and effect name") ,
75 XO("Group by publisher") ,
76 XO("Group by type") ,
77 XO("Group by category"),
78 XO("Group by type and publisher")
79 },
80 {
81 wxT("sortby:name") ,
82 wxT("sortby:publisher:name") ,
83 wxT("sortby:type:name") ,
84 wxT("groupby:publisher") ,
85 wxT("groupby:type") ,
86 wxT("default"),
87 wxT("groupby:type:publisher")
88 }
89};
90
92 wxT("/Effects/SkipEffectsScanAtStartup"),
93 false
94};
95
97 wxT("/Effects/GroupBy"),
99 5 // "default"
100};
101
103 wxT("/Effects/RealtimeGroupBy"),
105 6 // "groupby:type:publisher"
106};
107
109{
110 S.SetBorder(2);
111 S.StartScroller();
112
113 S.StartStatic(XO("Effect Options"));
114 {
115 S.StartMultiColumn(2);
116 {
117 S.MinSize()
118 .TieChoice( XXO("Effect menu &organization:"), EffectsGroupBy);
119 S.MinSize()
120 .TieChoice( XXO("Realtime effect o&rganization:"), RealtimeEffectsGroupBy);
121 }
122 S.TieCheckBox(XXO("&Skip effects scanning at startup"), SkipEffectsScanAtStartup);
123 S.EndMultiColumn();
124 }
125 S.EndStatic();
126
127#ifdef EXPERIMENTAL_EQ_SSE_THREADED
128 S.StartStatic(XO("Instruction Set"));
129 {
130 S.TieCheckBox(XXO("&Use SSE/SSE2/.../AVX"),
131 {wxT("/SSE/GUI"),
132 true});
133 }
134 S.EndStatic();
135#endif
136
137 if (auto pButton = S.AddButton(XXO("Open Plugin &Manager"), wxALIGN_LEFT))
138 pButton->Bind(wxEVT_BUTTON, [this](auto) {
139 //Adding dependency on PluginRegistrationDialog, not good. Alternatively
140 //that could be done with events, though event should be visible here too...
141 PluginRegistrationDialog dialog(wxGetTopLevelParent(this));
142 if(dialog.ShowModal() == wxID_OK)
144 });
145
146 S.EndScroller();
147}
148
150{
153
154 return true;
155}
156
157namespace{
159 [](wxWindow *parent, wxWindowID winid, AudacityProject *)
160 {
161 wxASSERT(parent); // to justify safenew
162 return safenew EffectsPrefs(parent, winid);
163 }
164};
165}
wxT("CloseDown"))
EnumValueSymbols EffectsGroupSymbols
ChoiceSetting EffectsGroupBy
BoolSetting SkipEffectsScanAtStartup
ChoiceSetting RealtimeEffectsGroupBy
#define EFFECTS_PREFS_PLUGIN_SYMBOL
Definition: EffectsPrefs.h:23
XO("Cut/Copy/Paste")
XXO("&Cut/Copy/Paste Toolbar")
#define safenew
Definition: MemoryX.h:9
ByColumns_t ByColumns
Definition: Prefs.cpp:515
@ eIsCreatingFromPrefs
Definition: ShuttleGui.h:46
@ eIsSavingToPrefs
Definition: ShuttleGui.h:47
#define S(N)
Definition: ToChars.cpp:64
The top-level handle to an Audacity project. It serves as a source of events that other objects can b...
Definition: Project.h:90
This specialization of Setting for bool adds a Toggle method to negate the saved value.
Definition: Prefs.h:346
ComponentInterfaceSymbol pairs a persistent string identifier used internally with an optional,...
A PrefsPanel for general GUI preferences.
Definition: EffectsPrefs.h:26
void PopulateOrExchange(ShuttleGui &S) override
EffectsPrefs(wxWindow *parent, wxWindowID winid)
bool Commit() override
ComponentInterfaceSymbol GetSymbol() const override
TranslatableString GetDescription() const override
ManualPageID HelpPageName() override
If not empty string, the Help button is added below the panel.
static void RebuildAllMenuBars()
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs,...
Definition: PrefsPanel.h:51
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:640
Holds a msgid for the translation catalog; may also bind format arguments.
PrefsPanel::Registration sAttachment