27 S.AddPrompt(
XXO(
"Type:"));
28 mType =
S.Id(
ID_Type).AddChoice({}, {}, 0);
30 S.AddPrompt(
XXO(
"&Preset:"));
31 mPresets =
S.Style(wxLB_SINGLE | wxLB_NEEDED_SB).AddListBox({});
35 S.AddStandardButtons();
40 mFactoryPresets = effect->GetDefinition().GetFactoryPresets();
42 if (mUserPresets.size() > 0)
44 mType->Append(
_(
"User Presets"));
47 if (mFactoryPresets.size() > 0)
49 mType->Append(
_(
"Factory Presets"));
54 mType->Append(
_(
"Current Settings"));
59 mType->Append(
_(
"Factory Defaults"));
102 if (type ==
XO(
"User Presets"))
108 mPresets->SetStringSelection(prefix);
109 if (
mPresets->GetSelection() == wxNOT_FOUND)
116 else if (type ==
XO(
"Factory Presets"))
129 mPresets->SetStringSelection(prefix);
130 if (
mPresets->GetSelection() == wxNOT_FOUND)
137 else if (type ==
XO(
"Current Settings"))
143 else if (type ==
XO(
"Factory Defaults"))
153 int selected =
mType->GetSelection();
154 if (selected == wxNOT_FOUND)
157 mType->SetSelection(selected);
159 wxString type =
mType->GetString(selected);
161 if (type ==
_(
"User Presets"))
163 selected =
mPresets->GetSelection();
164 if (selected == wxNOT_FOUND)
177 else if (type ==
_(
"Factory Presets"))
179 selected =
mPresets->GetSelection();
180 if (selected == wxNOT_FOUND)
200 else if (type ==
_(
"Current Settings"))
206 else if (type ==
_(
"Factory Defaults"))
EVT_BUTTON(wxID_NO, DependencyDialog::OnNo) EVT_BUTTON(wxID_YES
bool HasCurrentSettings(EffectPlugin &host)
bool HasFactoryDefaults(EffectPlugin &host)
RegistryPaths GetUserPresets(EffectPlugin &host)
XXO("&Cut/Copy/Paste Toolbar")
Factory of instances of an effect.
static const wxString kUserPresetIdent
static const wxString kFactoryPresetIdent
static const wxString kCurrentSettingsIdent
static const wxString kFactoryDefaultsIdent
wxString GetSelected() const
void SetPrefix(const TranslatableString &type, const wxString &prefix)
RegistryPaths mFactoryPresets
virtual ~EffectPresetsDialog()
void OnType(wxCommandEvent &evt)
void SetSelected(const wxString &parms)
void OnOk(wxCommandEvent &evt)
void OnCancel(wxCommandEvent &evt)
RegistryPaths mUserPresets
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Holds a msgid for the translation catalog; may also bind format arguments.
wxString Translation() const