MCPcopy Create free account
hub / github.com/audacity/audacity / EffectPresetsDialog

Method EffectPresetsDialog

src/effects/EffectPresetDialog.cpp:18–63  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16END_EVENT_TABLE()
17
18EffectPresetsDialog::EffectPresetsDialog(wxWindow* parent, EffectPlugin* effect)
19 : wxDialogWrapper(parent, wxID_ANY, XO("Select Preset"))
20{
21 ShuttleGui S(this, eIsCreating);
22 S.StartVerticalLay();
23 {
24 S.StartTwoColumn();
25 S.SetStretchyCol(1);
26 {
27 S.AddPrompt(XXO("Type:"));
28 mType = S.Id(ID_Type).AddChoice({}, {}, 0);
29
30 S.AddPrompt(XXO("&Preset:"));
31 mPresets = S.Style(wxLB_SINGLE | wxLB_NEEDED_SB).AddListBox({});
32 }
33 S.EndTwoColumn();
34
35 S.AddStandardButtons();
36 }
37 S.EndVerticalLay();
38
39 mUserPresets = GetUserPresets(*effect);
40 mFactoryPresets = effect->GetDefinition().GetFactoryPresets();
41
42 if (mUserPresets.size() > 0)
43 {
44 mType->Append(_("User Presets"));
45 }
46
47 if (mFactoryPresets.size() > 0)
48 {
49 mType->Append(_("Factory Presets"));
50 }
51
52 if (HasCurrentSettings(*effect))
53 {
54 mType->Append(_("Current Settings"));
55 }
56
57 if (HasFactoryDefaults(*effect))
58 {
59 mType->Append(_("Factory Defaults"));
60 }
61
62 UpdateUI();
63}
64
65EffectPresetsDialog::~EffectPresetsDialog()
66{

Callers

nothing calls this directly

Calls 10

GetUserPresetsFunction · 0.85
HasCurrentSettingsFunction · 0.85
HasFactoryDefaultsFunction · 0.85
SetStretchyColMethod · 0.80
AddPromptMethod · 0.80
AddChoiceMethod · 0.80
AddListBoxMethod · 0.80
GetFactoryPresetsMethod · 0.45
sizeMethod · 0.45
AppendMethod · 0.45

Tested by

no test coverage detected