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 "widgets/wxPanelWrapper.h" // to inherit
14#include <vector>
15#include <unordered_map> // member
16
17class CheckListAx;
18enum EffectType : int;
20class ShuttleGui;
21class wxListEvent;
22class wxListCtrl;
23
25{
26public:
27 // constructors and destructors
28 PluginRegistrationDialog(wxWindow *parent);
29
30private:
31 struct ItemData
32 {
33 std::vector<PluginDescriptor*> plugs;
34 wxString name;
36 int state;
37 bool valid;
41 };
42
43 using ItemDataMap = std::unordered_map<PluginPath, ItemData>;
44
45 void Populate();
47 void RegenerateEffectsList(int iShowWhat);
48 void SetState(int i, bool toggle, bool state = true);
49
50 static int wxCALLBACK SortCompare(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData);
51 int SortCompare(ItemData *item1, ItemData *item2);
52
53 void OnChangedVisibility(wxCommandEvent & evt);
54 void OnSort(wxListEvent & evt);
55 void DoSort( int col );
56 void OnListChar(wxKeyEvent & evt);
57 void OnOK(wxCommandEvent & evt);
58 void OnCancel(wxCommandEvent & evt);
59 void OnSelectAll(wxCommandEvent & evt);
60 void OnClearAll(wxCommandEvent & evt);
61 void OnEnable(wxCommandEvent & evt);
62 void OnDisable(wxCommandEvent & evt);
63
64private:
66
67 wxArrayString mStates;
69
72
74
75 wxListCtrl *mEffects;
76#if wxUSE_ACCESSIBILITY
77 CheckListAx *mAx;
78#endif
79
80 DECLARE_EVENT_TABLE()
81};
82
83
84#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
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 OnCancel(wxCommandEvent &evt)
static int wxCALLBACK SortCompare(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData)
std::unordered_map< PluginPath, ItemData > ItemDataMap
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:628
std::vector< PluginDescriptor * > plugs