Audacity 3.2.0
PluginRegistrationDialog.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 PluginRegistrationDialog.h
6
7 Paul Licameli split from PluginManager.cpp
8
9**********************************************************************/
10#ifndef __AUDACITY_PLUGIN_REGISTRATION_DIALOG__
11#define __AUDACITY_PLUGIN_REGISTRATION_DIALOG__
12
13#include "wxPanelWrapper.h" // to inherit
14#include <vector>
15#include <unordered_map> // member
16
17class CheckListAx;
18enum EffectType : int;
20class PluginManager;
21class ShuttleGui;
22class wxListEvent;
23class wxListCtrl;
24
26{
27public:
28 // constructors and destructors
29 PluginRegistrationDialog(wxWindow *parent);
30
31private:
32 struct ItemData
33 {
34 std::vector<PluginDescriptor*> plugs;
35 wxString name;
37 int state;
38 bool valid;
42 };
43
44 using ItemDataMap = std::unordered_map<PluginPath, ItemData>;
45
46 void Populate();
49 void RegenerateEffectsList(int iShowWhat);
50 void SetState(int i, bool toggle, bool state = true);
51
52 static int wxCALLBACK SortCompare(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData);
53 int SortCompare(ItemData *item1, ItemData *item2);
54
55 void OnChangedVisibility(wxCommandEvent & evt);
56 void OnSort(wxListEvent & evt);
57 void DoSort( int col );
58 void OnListChar(wxKeyEvent & evt);
59 void OnOK(wxCommandEvent & evt);
60 void OnCancel(wxCommandEvent & evt);
61 void OnSelectAll(wxCommandEvent & evt);
62 void OnClearAll(wxCommandEvent & evt);
63 void OnRescan(wxCommandEvent & evt);
64 void OnEnable(wxCommandEvent & evt);
65 void OnDisable(wxCommandEvent & evt);
66
67private:
69
70 wxArrayString mStates;
72
75
77
78 wxListCtrl *mEffects;
79#if wxUSE_ACCESSIBILITY
80 CheckListAx *mAx;
81#endif
82
83 DECLARE_EVENT_TABLE()
84};
85
86
87#endif
EffectType
wxString PluginPath
type alias for identifying a Plugin supplied by a module, each module defining its own interpretation...
Definition: Identifier.h:214
#define S(N)
Definition: ToChars.cpp:64
PluginManager maintains a list of all plug ins. That covers modules, effects, generators,...
Definition: PluginManager.h:51
void PopulateOrExchange(ShuttleGui &S)
Defines the dialog and does data exchange with it.
void OnClearAll(wxCommandEvent &evt)
void OnDisable(wxCommandEvent &evt)
void SetState(int i, bool toggle, bool state=true)
void PopulateItemsList(PluginManager &pm)
void OnCancel(wxCommandEvent &evt)
static int wxCALLBACK SortCompare(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
std::unordered_map< PluginPath, ItemData > ItemDataMap
void OnRescan(wxCommandEvent &evt)
void RegenerateEffectsList(int iShowWhat)
void OnChangedVisibility(wxCommandEvent &evt)
void OnOK(wxCommandEvent &evt)
void OnEnable(wxCommandEvent &evt)
void OnSelectAll(wxCommandEvent &evt)
Derived from ShuttleGuiBase, an Audacity specific class for shuttling data to and from GUI.
Definition: ShuttleGui.h:625
std::vector< PluginDescriptor * > plugs