Move class PluginRegistrationDialog to a header file
This commit is contained in:
parent
ff0dd1ea48
commit
710ec976ff
|
@ -202,6 +202,7 @@ list( APPEND SOURCES
|
||||||
PlaybackSchedule.h
|
PlaybackSchedule.h
|
||||||
PluginManager.cpp
|
PluginManager.cpp
|
||||||
PluginManager.h
|
PluginManager.h
|
||||||
|
PluginRegistrationDialog.h
|
||||||
Prefs.cpp
|
Prefs.cpp
|
||||||
Prefs.h
|
Prefs.h
|
||||||
Printing.cpp
|
Printing.cpp
|
||||||
|
|
|
@ -46,6 +46,7 @@ for shared and private configs - which need to move out.
|
||||||
#include "FileNames.h"
|
#include "FileNames.h"
|
||||||
#include "ModuleManager.h"
|
#include "ModuleManager.h"
|
||||||
#include "PlatformCompatibility.h"
|
#include "PlatformCompatibility.h"
|
||||||
|
#include "PluginRegistrationDialog.h"
|
||||||
#include "Prefs.h"
|
#include "Prefs.h"
|
||||||
#include "ShuttleGui.h"
|
#include "ShuttleGui.h"
|
||||||
#include "wxFileNameWrapper.h"
|
#include "wxFileNameWrapper.h"
|
||||||
|
@ -379,20 +380,6 @@ enum
|
||||||
STATE_COUNT
|
STATE_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ItemData
|
|
||||||
{
|
|
||||||
std::vector<PluginDescriptor*> plugs;
|
|
||||||
wxString name;
|
|
||||||
PluginPath path;
|
|
||||||
int state;
|
|
||||||
bool valid;
|
|
||||||
int nameWidth;
|
|
||||||
int pathWidth;
|
|
||||||
int stateWidth;
|
|
||||||
};
|
|
||||||
|
|
||||||
using ItemDataMap = std::unordered_map<PluginPath, ItemData>;
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
ID_ShowAll = 10000,
|
ID_ShowAll = 10000,
|
||||||
|
@ -415,52 +402,6 @@ enum
|
||||||
COL_COUNT
|
COL_COUNT
|
||||||
};
|
};
|
||||||
|
|
||||||
class PluginRegistrationDialog final : public wxDialogWrapper
|
|
||||||
{
|
|
||||||
public:
|
|
||||||
// constructors and destructors
|
|
||||||
PluginRegistrationDialog(wxWindow *parent, EffectType type);
|
|
||||||
|
|
||||||
private:
|
|
||||||
void Populate();
|
|
||||||
void PopulateOrExchange(ShuttleGui & S);
|
|
||||||
void RegenerateEffectsList(int iShowWhat);
|
|
||||||
void SetState(int i, bool toggle, bool state = true);
|
|
||||||
|
|
||||||
static int wxCALLBACK SortCompare(wxIntPtr item1, wxIntPtr item2, wxIntPtr sortData);
|
|
||||||
int SortCompare(ItemData *item1, ItemData *item2);
|
|
||||||
|
|
||||||
void OnChangedVisibility(wxCommandEvent & evt);
|
|
||||||
void OnSort(wxListEvent & evt);
|
|
||||||
void DoSort( int col );
|
|
||||||
void OnListChar(wxKeyEvent & evt);
|
|
||||||
void OnOK(wxCommandEvent & evt);
|
|
||||||
void OnCancel(wxCommandEvent & evt);
|
|
||||||
void OnSelectAll(wxCommandEvent & evt);
|
|
||||||
void OnClearAll(wxCommandEvent & evt);
|
|
||||||
void OnEnable(wxCommandEvent & evt);
|
|
||||||
void OnDisable(wxCommandEvent & evt);
|
|
||||||
|
|
||||||
private:
|
|
||||||
EffectType mType;
|
|
||||||
int mFilter;
|
|
||||||
|
|
||||||
wxArrayString mStates;
|
|
||||||
ItemDataMap mItems;
|
|
||||||
|
|
||||||
int mSortColumn;
|
|
||||||
int mSortDirection;
|
|
||||||
|
|
||||||
PluginPath mLongestPath;
|
|
||||||
|
|
||||||
wxListCtrl *mEffects;
|
|
||||||
#if wxUSE_ACCESSIBILITY
|
|
||||||
CheckListAx *mAx;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
|
||||||
};
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(PluginRegistrationDialog, wxDialogWrapper)
|
BEGIN_EVENT_TABLE(PluginRegistrationDialog, wxDialogWrapper)
|
||||||
EVT_LIST_COL_CLICK(ID_List, PluginRegistrationDialog::OnSort)
|
EVT_LIST_COL_CLICK(ID_List, PluginRegistrationDialog::OnSort)
|
||||||
EVT_BUTTON(wxID_OK, PluginRegistrationDialog::OnOK)
|
EVT_BUTTON(wxID_OK, PluginRegistrationDialog::OnOK)
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue