mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-17 16:40:07 +02:00
Add ComponentInterface to PrefsPanel
This is so that we can have plug-in prefs panels loaded from a dll, and introspect what we have.
This commit is contained in:
parent
ca0bf0c12d
commit
3b312f9d1b
@ -38,6 +38,21 @@ BatchPrefs::BatchPrefs(wxWindow * parent, wxWindowID winid):
|
|||||||
Populate();
|
Populate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol BatchPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return BATCH_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString BatchPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Batch");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString BatchPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Batch_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
/// Creates the dialog and its contents.
|
/// Creates the dialog and its contents.
|
||||||
void BatchPrefs::Populate( )
|
void BatchPrefs::Populate( )
|
||||||
{
|
{
|
||||||
|
@ -18,11 +18,17 @@
|
|||||||
|
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|
||||||
|
#define BATCH_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Batch") }
|
||||||
|
|
||||||
class BatchPrefs final : public PrefsPanel
|
class BatchPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BatchPrefs(wxWindow * parent, wxWindowID winid);
|
BatchPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
~BatchPrefs();
|
~BatchPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
void PopulateOrExchange(ShuttleGui & S) override;
|
void PopulateOrExchange(ShuttleGui & S) override;
|
||||||
|
|
||||||
|
@ -62,6 +62,22 @@ DevicePrefs::~DevicePrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol DevicePrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return DEVICE_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString DevicePrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Device");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString DevicePrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Devices_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
void DevicePrefs::Populate()
|
void DevicePrefs::Populate()
|
||||||
{
|
{
|
||||||
// First any pre-processing for constructing the GUI.
|
// First any pre-processing for constructing the GUI.
|
||||||
@ -85,6 +101,7 @@ void DevicePrefs::Populate()
|
|||||||
OnHost(e);
|
OnHost(e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Get names of device hosts.
|
* Get names of device hosts.
|
||||||
*/
|
*/
|
||||||
@ -403,11 +420,6 @@ bool DevicePrefs::Commit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString DevicePrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Devices_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *DevicePrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *DevicePrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -20,11 +20,16 @@ class wxChoice;
|
|||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
class wxArrayStringEx;
|
class wxArrayStringEx;
|
||||||
|
|
||||||
|
#define DEVICE_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Device") }
|
||||||
|
|
||||||
class DevicePrefs final : public PrefsPanel
|
class DevicePrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DevicePrefs(wxWindow * parent, wxWindowID winid);
|
DevicePrefs(wxWindow * parent, wxWindowID winid);
|
||||||
virtual ~DevicePrefs();
|
virtual ~DevicePrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
void PopulateOrExchange(ShuttleGui & S) override;
|
void PopulateOrExchange(ShuttleGui & S) override;
|
||||||
|
@ -61,6 +61,22 @@ DirectoriesPrefs::~DirectoriesPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol DirectoriesPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return DIRECTORIES_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString DirectoriesPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Directories");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString DirectoriesPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Directories_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
/// Creates the dialog and its contents.
|
/// Creates the dialog and its contents.
|
||||||
void DirectoriesPrefs::Populate()
|
void DirectoriesPrefs::Populate()
|
||||||
{
|
{
|
||||||
@ -271,11 +287,6 @@ bool DirectoriesPrefs::Commit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString DirectoriesPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Directories_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *DirectoriesPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *DirectoriesPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -18,11 +18,16 @@ class ShuttleGui;
|
|||||||
class wxStaticText;
|
class wxStaticText;
|
||||||
class wxTextCtrl;
|
class wxTextCtrl;
|
||||||
|
|
||||||
|
#define DIRECTORIES_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Directories") }
|
||||||
|
|
||||||
class DirectoriesPrefs final : public PrefsPanel
|
class DirectoriesPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DirectoriesPrefs(wxWindow * parent, wxWindowID winid);
|
DirectoriesPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
~DirectoriesPrefs();
|
~DirectoriesPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
bool Validate() override;
|
bool Validate() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
|
@ -42,6 +42,21 @@ EffectsPrefs::~EffectsPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol EffectsPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return EFFECTS_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString EffectsPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Effects");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString EffectsPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Effects_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
void EffectsPrefs::Populate()
|
void EffectsPrefs::Populate()
|
||||||
{
|
{
|
||||||
//------------------------- Main section --------------------
|
//------------------------- Main section --------------------
|
||||||
@ -186,11 +201,6 @@ bool EffectsPrefs::Commit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString EffectsPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Effects_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *EffectsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *EffectsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -19,11 +19,16 @@
|
|||||||
|
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|
||||||
|
#define EFFECTS_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Effects") }
|
||||||
|
|
||||||
class EffectsPrefs final : public PrefsPanel
|
class EffectsPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EffectsPrefs(wxWindow * parent, wxWindowID winid);
|
EffectsPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
~EffectsPrefs();
|
~EffectsPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
void PopulateOrExchange(ShuttleGui & S) override;
|
void PopulateOrExchange(ShuttleGui & S) override;
|
||||||
|
@ -70,6 +70,21 @@ ExtImportPrefs::~ExtImportPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol ExtImportPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return EXT_IMPORT_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString ExtImportPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for ExtImport");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString ExtImportPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Extended_Import_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
/// Creates the dialog and its contents.
|
/// Creates the dialog and its contents.
|
||||||
void ExtImportPrefs::Populate()
|
void ExtImportPrefs::Populate()
|
||||||
{
|
{
|
||||||
@ -674,11 +689,6 @@ void ExtImportPrefs::OnRuleTableCellClick (wxGridEvent& event)
|
|||||||
event.Skip();
|
event.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString ExtImportPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Extended_Import_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
ExtImportPrefsDropTarget::ExtImportPrefsDropTarget(wxDataObject *dataObject)
|
ExtImportPrefsDropTarget::ExtImportPrefsDropTarget(wxDataObject *dataObject)
|
||||||
: wxDropTarget(dataObject)
|
: wxDropTarget(dataObject)
|
||||||
{
|
{
|
||||||
|
@ -28,6 +28,8 @@ class ExtImportPrefs;
|
|||||||
class Grid;
|
class Grid;
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|
||||||
|
#define EXT_IMPORT_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Ext Import") }
|
||||||
|
|
||||||
class ExtImportPrefsDropTarget final : public wxDropTarget
|
class ExtImportPrefsDropTarget final : public wxDropTarget
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
@ -49,6 +51,9 @@ class ExtImportPrefs final : public PrefsPanel
|
|||||||
public:
|
public:
|
||||||
ExtImportPrefs(wxWindow * parent, wxWindowID winid);
|
ExtImportPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
~ExtImportPrefs();
|
~ExtImportPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
void PopulateOrExchange(ShuttleGui & S) override;
|
void PopulateOrExchange(ShuttleGui & S) override;
|
||||||
|
@ -47,6 +47,21 @@ GUIPrefs::~GUIPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol GUIPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return GUI_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString GUIPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for GUI");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString GUIPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Interface_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
void GUIPrefs::GetRangeChoices(
|
void GUIPrefs::GetRangeChoices(
|
||||||
wxArrayStringEx *pChoices, wxArrayStringEx *pCodes)
|
wxArrayStringEx *pChoices, wxArrayStringEx *pCodes)
|
||||||
{
|
{
|
||||||
@ -253,11 +268,6 @@ bool GUIPrefs::Commit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString GUIPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Interface_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *GUIPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *GUIPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -20,11 +20,16 @@
|
|||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
class wxArrayStringEx;
|
class wxArrayStringEx;
|
||||||
|
|
||||||
|
#define GUI_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("GUI") }
|
||||||
|
|
||||||
class GUIPrefs final : public PrefsPanel
|
class GUIPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
GUIPrefs(wxWindow * parent, wxWindowID winid);
|
GUIPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
~GUIPrefs();
|
~GUIPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
void PopulateOrExchange(ShuttleGui & S) override;
|
void PopulateOrExchange(ShuttleGui & S) override;
|
||||||
|
@ -35,6 +35,21 @@ ImportExportPrefs::~ImportExportPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol ImportExportPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return IMPORT_EXPORT_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString ImportExportPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for ImportExport");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString ImportExportPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Import_-_Export_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
/// Creates the dialog and its contents.
|
/// Creates the dialog and its contents.
|
||||||
void ImportExportPrefs::Populate()
|
void ImportExportPrefs::Populate()
|
||||||
{
|
{
|
||||||
@ -113,11 +128,6 @@ bool ImportExportPrefs::Commit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString ImportExportPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Import_-_Export_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *ImportExportPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *ImportExportPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -19,11 +19,16 @@
|
|||||||
|
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|
||||||
|
#define IMPORT_EXPORT_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("IMPORT EXPORT") }
|
||||||
|
|
||||||
class ImportExportPrefs final : public PrefsPanel
|
class ImportExportPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ImportExportPrefs(wxWindow * parent, wxWindowID winid);
|
ImportExportPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
~ImportExportPrefs();
|
~ImportExportPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
void PopulateOrExchange(ShuttleGui & S) override;
|
void PopulateOrExchange(ShuttleGui & S) override;
|
||||||
|
@ -98,6 +98,21 @@ KeyConfigPrefs::KeyConfigPrefs(wxWindow * parent, wxWindowID winid,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol KeyConfigPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return KEY_CONFIG_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString KeyConfigPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for KeyConfig");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString KeyConfigPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Keyboard_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
void KeyConfigPrefs::Populate()
|
void KeyConfigPrefs::Populate()
|
||||||
{
|
{
|
||||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||||
@ -673,11 +688,6 @@ void KeyConfigPrefs::Cancel()
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString KeyConfigPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Keyboard_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *KeyConfigPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *KeyConfigPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -27,10 +27,15 @@ class KeyView;
|
|||||||
struct NormalizedKeyString;
|
struct NormalizedKeyString;
|
||||||
enum ViewByType : int;
|
enum ViewByType : int;
|
||||||
|
|
||||||
|
#define KEY_CONFIG_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Key Config") }
|
||||||
|
|
||||||
class KeyConfigPrefs final : public PrefsPanel
|
class KeyConfigPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
KeyConfigPrefs(wxWindow * parent, wxWindowID winid, const CommandID &name);
|
KeyConfigPrefs(wxWindow * parent, wxWindowID winid, const CommandID &name);
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
void Cancel() override;
|
void Cancel() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
|
@ -58,6 +58,21 @@ LibraryPrefs::~LibraryPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol LibraryPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return LIBRARY_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString LibraryPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Library");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString LibraryPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Libraries_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
/// Creates the dialog and its contents.
|
/// Creates the dialog and its contents.
|
||||||
void LibraryPrefs::Populate()
|
void LibraryPrefs::Populate()
|
||||||
{
|
{
|
||||||
@ -252,11 +267,6 @@ bool LibraryPrefs::Commit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString LibraryPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Libraries_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *LibraryPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *LibraryPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -20,11 +20,16 @@
|
|||||||
class wxStaticText;
|
class wxStaticText;
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|
||||||
|
#define LIBRARY_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Library") }
|
||||||
|
|
||||||
class LibraryPrefs final : public PrefsPanel
|
class LibraryPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
LibraryPrefs(wxWindow * parent, wxWindowID winid);
|
LibraryPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
~LibraryPrefs();
|
~LibraryPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
void PopulateOrExchange(ShuttleGui & S) override;
|
void PopulateOrExchange(ShuttleGui & S) override;
|
||||||
|
@ -67,6 +67,21 @@ MidiIOPrefs::~MidiIOPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol MidiIOPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return MIDI_IO_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString MidiIOPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for MidiIO");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString MidiIOPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "MIDI_Devices_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
void MidiIOPrefs::Populate()
|
void MidiIOPrefs::Populate()
|
||||||
{
|
{
|
||||||
// First any pre-processing for constructing the GUI.
|
// First any pre-processing for constructing the GUI.
|
||||||
@ -284,11 +299,6 @@ bool MidiIOPrefs::Validate()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString MidiIOPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "MIDI_Devices_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *MidiIOPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *MidiIOPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -26,11 +26,16 @@ class ShuttleGui;
|
|||||||
|
|
||||||
class wxArrayStringEx;
|
class wxArrayStringEx;
|
||||||
|
|
||||||
|
#define MIDI_IO_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Midi IO") }
|
||||||
|
|
||||||
class MidiIOPrefs final : public PrefsPanel
|
class MidiIOPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MidiIOPrefs(wxWindow * parent, wxWindowID winid);
|
MidiIOPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
virtual ~MidiIOPrefs();
|
virtual ~MidiIOPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
bool Validate() override;
|
bool Validate() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
|
@ -39,6 +39,21 @@ ModulePrefs::~ModulePrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol ModulePrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return MODULE_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString ModulePrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Module");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString ModulePrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Modules_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
void ModulePrefs::GetAllModuleStatuses(){
|
void ModulePrefs::GetAllModuleStatuses(){
|
||||||
wxString str;
|
wxString str;
|
||||||
long dummy;
|
long dummy;
|
||||||
@ -165,11 +180,6 @@ void ModulePrefs::SetModuleStatus(const FilePath &fname, int iStatus){
|
|||||||
gPrefs->Flush();
|
gPrefs->Flush();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString ModulePrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Modules_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *ModulePrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *ModulePrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -30,11 +30,16 @@ enum {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
#define MODULE_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Module") }
|
||||||
|
|
||||||
class ModulePrefs final : public PrefsPanel
|
class ModulePrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ModulePrefs(wxWindow * parent, wxWindowID winid);
|
ModulePrefs(wxWindow * parent, wxWindowID winid);
|
||||||
~ModulePrefs();
|
~ModulePrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
void PopulateOrExchange(ShuttleGui & S) override;
|
void PopulateOrExchange(ShuttleGui & S) override;
|
||||||
|
@ -71,6 +71,21 @@ MousePrefs::~MousePrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol MousePrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return MOUSE_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString MousePrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Mouse");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString MousePrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Mouse_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
/// Creates the dialog and its contents.
|
/// Creates the dialog and its contents.
|
||||||
void MousePrefs::Populate()
|
void MousePrefs::Populate()
|
||||||
{
|
{
|
||||||
@ -203,11 +218,6 @@ bool MousePrefs::Commit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString MousePrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Mouse_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *MousePrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *MousePrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -16,11 +16,16 @@
|
|||||||
class wxListCtrl;
|
class wxListCtrl;
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|
||||||
|
#define MOUSE_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Mouse") }
|
||||||
|
|
||||||
class MousePrefs final : public PrefsPanel
|
class MousePrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
MousePrefs(wxWindow * parent, wxWindowID winid);
|
MousePrefs(wxWindow * parent, wxWindowID winid);
|
||||||
~MousePrefs();
|
~MousePrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
void PopulateOrExchange(ShuttleGui & S) override;
|
void PopulateOrExchange(ShuttleGui & S) override;
|
||||||
|
@ -38,6 +38,21 @@ PlaybackPrefs::~PlaybackPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol PlaybackPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return PLAYBACK_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString PlaybackPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Playback");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString PlaybackPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Playback_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
void PlaybackPrefs::Populate()
|
void PlaybackPrefs::Populate()
|
||||||
{
|
{
|
||||||
//------------------------- Main section --------------------
|
//------------------------- Main section --------------------
|
||||||
@ -168,11 +183,6 @@ bool PlaybackPrefs::Commit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString PlaybackPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Playback_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *PlaybackPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *PlaybackPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -18,11 +18,16 @@
|
|||||||
|
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|
||||||
|
#define PLAYBACK_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Playback") }
|
||||||
|
|
||||||
class PlaybackPrefs final : public PrefsPanel
|
class PlaybackPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PlaybackPrefs(wxWindow * parent, wxWindowID winid);
|
PlaybackPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
virtual ~PlaybackPrefs();
|
virtual ~PlaybackPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
void PopulateOrExchange(ShuttleGui & S) override;
|
void PopulateOrExchange(ShuttleGui & S) override;
|
||||||
|
@ -77,6 +77,15 @@
|
|||||||
#include "../widgets/WindowAccessible.h"
|
#include "../widgets/WindowAccessible.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
|
// PrefsPanel might move out into its own file in due ocurse.
|
||||||
|
PluginPath PrefsPanel::GetPath(){ return BUILTIN_PREFS_PANEL_PREFIX + GetSymbol().Internal(); }
|
||||||
|
VendorSymbol PrefsPanel::GetVendor(){ return XO("Audacity");}
|
||||||
|
wxString PrefsPanel::GetVersion(){ return AUDACITY_VERSION_STRING;}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(PrefsDialog, wxDialogWrapper)
|
BEGIN_EVENT_TABLE(PrefsDialog, wxDialogWrapper)
|
||||||
EVT_BUTTON(wxID_OK, PrefsDialog::OnOK)
|
EVT_BUTTON(wxID_OK, PrefsDialog::OnOK)
|
||||||
EVT_BUTTON(wxID_CANCEL, PrefsDialog::OnCancel)
|
EVT_BUTTON(wxID_CANCEL, PrefsDialog::OnCancel)
|
||||||
|
@ -34,10 +34,13 @@ PrefsPanel.
|
|||||||
#define __AUDACITY_PREFS_PANEL__
|
#define __AUDACITY_PREFS_PANEL__
|
||||||
|
|
||||||
#include "../widgets/wxPanelWrapper.h" // to inherit
|
#include "../widgets/wxPanelWrapper.h" // to inherit
|
||||||
|
#include "../include/audacity/ComponentInterface.h"
|
||||||
|
|
||||||
/* A few constants for an attempt at semi-uniformity */
|
/* A few constants for an attempt at semi-uniformity */
|
||||||
#define PREFS_FONT_SIZE 8
|
#define PREFS_FONT_SIZE 8
|
||||||
|
|
||||||
|
#define BUILTIN_PREFS_PANEL_PREFIX wxT("Built-in PrefsPanel: ")
|
||||||
|
|
||||||
/* these are spacing guidelines: ie. radio buttons should have a 5 pixel
|
/* these are spacing guidelines: ie. radio buttons should have a 5 pixel
|
||||||
* border on each side */
|
* border on each side */
|
||||||
#define RADIO_BUTTON_BORDER 5
|
#define RADIO_BUTTON_BORDER 5
|
||||||
@ -46,7 +49,7 @@ PrefsPanel.
|
|||||||
|
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|
||||||
class PrefsPanel /* not final */ : public wxPanelWrapper
|
class PrefsPanel /* not final */ : public wxPanelWrapper, ComponentInterface
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
PrefsPanel(wxWindow * parent, wxWindowID winid, const wxString &title)
|
PrefsPanel(wxWindow * parent, wxWindowID winid, const wxString &title)
|
||||||
@ -62,6 +65,15 @@ class PrefsPanel /* not final */ : public wxPanelWrapper
|
|||||||
virtual void Preview() {} // Make tentative changes
|
virtual void Preview() {} // Make tentative changes
|
||||||
virtual bool Commit() = 0; // used to be called "Apply"
|
virtual bool Commit() = 0; // used to be called "Apply"
|
||||||
|
|
||||||
|
|
||||||
|
virtual PluginPath GetPath();
|
||||||
|
virtual VendorSymbol GetVendor();
|
||||||
|
virtual wxString GetVersion();
|
||||||
|
|
||||||
|
//virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
//virtual wxString GetDescription();
|
||||||
|
|
||||||
|
|
||||||
// If it returns True, the Preview button is added below the panel
|
// If it returns True, the Preview button is added below the panel
|
||||||
// Default returns false
|
// Default returns false
|
||||||
virtual bool ShowsPreviewButton();
|
virtual bool ShowsPreviewButton();
|
||||||
|
@ -41,6 +41,21 @@ ProjectsPrefs::~ProjectsPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol ProjectsPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return PROJECTS_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString ProjectsPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Projects");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString ProjectsPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Projects_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
/// Creates the dialog and its contents.
|
/// Creates the dialog and its contents.
|
||||||
void ProjectsPrefs::Populate()
|
void ProjectsPrefs::Populate()
|
||||||
{
|
{
|
||||||
@ -84,11 +99,6 @@ bool ProjectsPrefs::Commit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString ProjectsPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Projects_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *ProjectsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *ProjectsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -19,11 +19,16 @@
|
|||||||
|
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|
||||||
|
#define PROJECTS_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Projects") }
|
||||||
|
|
||||||
class ProjectsPrefs final : public PrefsPanel
|
class ProjectsPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ProjectsPrefs(wxWindow * parent, wxWindowID winid);
|
ProjectsPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
~ProjectsPrefs();
|
~ProjectsPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
void PopulateOrExchange(ShuttleGui & S) override;
|
void PopulateOrExchange(ShuttleGui & S) override;
|
||||||
|
@ -111,6 +111,21 @@ QualityPrefs::~QualityPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol QualityPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return QUALITY_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString QualityPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Quality");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString QualityPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Quality_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
void QualityPrefs::Populate()
|
void QualityPrefs::Populate()
|
||||||
{
|
{
|
||||||
// First any pre-processing for constructing the GUI.
|
// First any pre-processing for constructing the GUI.
|
||||||
@ -262,11 +277,6 @@ bool QualityPrefs::Commit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString QualityPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Quality_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *QualityPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *QualityPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -25,11 +25,15 @@ enum DitherType : unsigned;
|
|||||||
|
|
||||||
class wxArrayStringEx;
|
class wxArrayStringEx;
|
||||||
|
|
||||||
|
#define QUALITY_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Quality") }
|
||||||
|
|
||||||
class QualityPrefs final : public PrefsPanel
|
class QualityPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QualityPrefs(wxWindow * parent, wxWindowID winid);
|
QualityPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
virtual ~QualityPrefs();
|
virtual ~QualityPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
|
@ -58,6 +58,21 @@ RecordingPrefs::~RecordingPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol RecordingPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return RECORDING_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString RecordingPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Recording");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString RecordingPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Recording_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
void RecordingPrefs::Populate()
|
void RecordingPrefs::Populate()
|
||||||
{
|
{
|
||||||
//------------------------- Main section --------------------
|
//------------------------- Main section --------------------
|
||||||
@ -290,11 +305,6 @@ void RecordingPrefs::OnToggleCustomName(wxCommandEvent & /* Evt */)
|
|||||||
mToggleCustomName->Enable(mUseCustomTrackName);
|
mToggleCustomName->Enable(mUseCustomTrackName);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString RecordingPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Recording_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *RecordingPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *RecordingPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -19,11 +19,16 @@
|
|||||||
class wxTextCtrl;
|
class wxTextCtrl;
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|
||||||
|
#define RECORDING_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Recording") }
|
||||||
|
|
||||||
class RecordingPrefs final : public PrefsPanel
|
class RecordingPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
RecordingPrefs(wxWindow * parent, wxWindowID winid);
|
RecordingPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
virtual ~RecordingPrefs();
|
virtual ~RecordingPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
void PopulateOrExchange(ShuttleGui & S) override;
|
void PopulateOrExchange(ShuttleGui & S) override;
|
||||||
|
@ -65,6 +65,28 @@ SpectrumPrefs::~SpectrumPrefs()
|
|||||||
Rollback();
|
Rollback();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol SpectrumPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return SPECTRUM_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString SpectrumPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Spectrum");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString SpectrumPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
// Currently (May2017) Spectrum Settings is the only preferences
|
||||||
|
// we ever display in a dialog on its own without others.
|
||||||
|
// We do so when it is configuring spectrums for a track.
|
||||||
|
// Because this happens, we want to visit a different help page.
|
||||||
|
// So we change the page name in the case of a page on its own.
|
||||||
|
return mWt
|
||||||
|
? "Spectrogram_Settings"
|
||||||
|
: "Spectrograms_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
ID_WINDOW_SIZE = 10001,
|
ID_WINDOW_SIZE = 10001,
|
||||||
#ifdef EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS
|
#ifdef EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS
|
||||||
@ -534,18 +556,6 @@ void SpectrumPrefs::EnableDisableSTFTOnlyControls()
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString SpectrumPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
// Currently (May2017) Spectrum Settings is the only preferences
|
|
||||||
// we ever display in a dialog on its own without others.
|
|
||||||
// We do so when it is configuring spectrums for a track.
|
|
||||||
// Because this happens, we want to visit a different help page.
|
|
||||||
// So we change the page name in the case of a page on its own.
|
|
||||||
return mWt
|
|
||||||
? "Spectrogram_Settings"
|
|
||||||
: "Spectrograms_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
BEGIN_EVENT_TABLE(SpectrumPrefs, PrefsPanel)
|
BEGIN_EVENT_TABLE(SpectrumPrefs, PrefsPanel)
|
||||||
EVT_CHOICE(ID_WINDOW_SIZE, SpectrumPrefs::OnWindowSize)
|
EVT_CHOICE(ID_WINDOW_SIZE, SpectrumPrefs::OnWindowSize)
|
||||||
EVT_CHECKBOX(ID_DEFAULTS, SpectrumPrefs::OnDefaults)
|
EVT_CHECKBOX(ID_DEFAULTS, SpectrumPrefs::OnDefaults)
|
||||||
|
@ -39,11 +39,16 @@ class ShuttleGui;
|
|||||||
class SpectrogramSettings;
|
class SpectrogramSettings;
|
||||||
class WaveTrack;
|
class WaveTrack;
|
||||||
|
|
||||||
|
#define SPECTRUM_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Spectrum") }
|
||||||
|
|
||||||
class SpectrumPrefs final : public PrefsPanel
|
class SpectrumPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
SpectrumPrefs(wxWindow * parent, wxWindowID winid, WaveTrack *wt);
|
SpectrumPrefs(wxWindow * parent, wxWindowID winid, WaveTrack *wt);
|
||||||
virtual ~SpectrumPrefs();
|
virtual ~SpectrumPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
void Preview() override;
|
void Preview() override;
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
void PopulateOrExchange(ShuttleGui & S) override;
|
void PopulateOrExchange(ShuttleGui & S) override;
|
||||||
|
@ -70,6 +70,21 @@ ThemePrefs::~ThemePrefs(void)
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol ThemePrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return THEME_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString ThemePrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Theme");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString ThemePrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Theme_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
/// Creates the dialog and its contents.
|
/// Creates the dialog and its contents.
|
||||||
void ThemePrefs::Populate()
|
void ThemePrefs::Populate()
|
||||||
{
|
{
|
||||||
|
@ -20,12 +20,18 @@
|
|||||||
|
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|
||||||
|
#define THEME_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Theme") }
|
||||||
|
|
||||||
class ThemePrefs final : public PrefsPanel
|
class ThemePrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
ThemePrefs(wxWindow * parent, wxWindowID winid);
|
ThemePrefs(wxWindow * parent, wxWindowID winid);
|
||||||
~ThemePrefs(void);
|
~ThemePrefs(void);
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
void Populate();
|
void Populate();
|
||||||
|
@ -34,6 +34,21 @@ TracksBehaviorsPrefs::~TracksBehaviorsPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol TracksBehaviorsPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return TRACKS_BEHAVIORS_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString TracksBehaviorsPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for TracksBehaviors");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString TracksBehaviorsPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Tracks_Behaviors_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
const wxChar *TracksBehaviorsPrefs::ScrollingPreferenceKey()
|
const wxChar *TracksBehaviorsPrefs::ScrollingPreferenceKey()
|
||||||
{
|
{
|
||||||
static auto string = wxT("/GUI/ScrollBeyondZero");
|
static auto string = wxT("/GUI/ScrollBeyondZero");
|
||||||
@ -119,11 +134,6 @@ bool TracksBehaviorsPrefs::Commit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString TracksBehaviorsPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Tracks_Behaviors_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
TracksBehaviorsPrefsFactory::TracksBehaviorsPrefsFactory()
|
TracksBehaviorsPrefsFactory::TracksBehaviorsPrefsFactory()
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
@ -19,11 +19,16 @@
|
|||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
class wxArrayStringEx;
|
class wxArrayStringEx;
|
||||||
|
|
||||||
|
#define TRACKS_BEHAVIORS_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Tracks Behaviors") }
|
||||||
|
|
||||||
class TracksBehaviorsPrefs final : public PrefsPanel
|
class TracksBehaviorsPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TracksBehaviorsPrefs(wxWindow * parent, wxWindowID winid);
|
TracksBehaviorsPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
~TracksBehaviorsPrefs();
|
~TracksBehaviorsPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
|
@ -239,6 +239,21 @@ TracksPrefs::~TracksPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol TracksPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return TRACKS_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString TracksPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Tracks");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString TracksPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Tracks_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
void TracksPrefs::Populate()
|
void TracksPrefs::Populate()
|
||||||
{
|
{
|
||||||
// Keep view choices and codes in proper correspondence --
|
// Keep view choices and codes in proper correspondence --
|
||||||
@ -392,11 +407,6 @@ bool TracksPrefs::Commit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString TracksPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Tracks_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *TracksPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *TracksPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -21,11 +21,16 @@
|
|||||||
|
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|
||||||
|
#define TRACKS_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Tracks") }
|
||||||
|
|
||||||
class TracksPrefs final : public PrefsPanel
|
class TracksPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TracksPrefs(wxWindow * parent, wxWindowID winid);
|
TracksPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
~TracksPrefs();
|
~TracksPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
|
@ -38,6 +38,21 @@ WarningsPrefs::~WarningsPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol WarningsPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return WARNINGS_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString WarningsPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Warnings");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString WarningsPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Warnings_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
void WarningsPrefs::Populate()
|
void WarningsPrefs::Populate()
|
||||||
{
|
{
|
||||||
//------------------------- Main section --------------------
|
//------------------------- Main section --------------------
|
||||||
@ -91,11 +106,6 @@ bool WarningsPrefs::Commit()
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString WarningsPrefs::HelpPageName()
|
|
||||||
{
|
|
||||||
return "Warnings_Preferences";
|
|
||||||
}
|
|
||||||
|
|
||||||
PrefsPanel *WarningsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
PrefsPanel *WarningsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||||
{
|
{
|
||||||
wxASSERT(parent); // to justify safenew
|
wxASSERT(parent); // to justify safenew
|
||||||
|
@ -19,11 +19,16 @@
|
|||||||
|
|
||||||
class ShuttleGui;
|
class ShuttleGui;
|
||||||
|
|
||||||
|
#define WARNINGS_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Warnings") }
|
||||||
|
|
||||||
class WarningsPrefs final : public PrefsPanel
|
class WarningsPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WarningsPrefs(wxWindow * parent, wxWindowID winid);
|
WarningsPrefs(wxWindow * parent, wxWindowID winid);
|
||||||
~WarningsPrefs();
|
~WarningsPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
wxString HelpPageName() override;
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
|
@ -52,6 +52,21 @@ WaveformPrefs::~WaveformPrefs()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ComponentInterfaceSymbol WaveformPrefs::GetSymbol()
|
||||||
|
{
|
||||||
|
return WAVEFORM_PREFS_PLUGIN_SYMBOL;
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString WaveformPrefs::GetDescription()
|
||||||
|
{
|
||||||
|
return _("Preferences for Waveforms");
|
||||||
|
}
|
||||||
|
|
||||||
|
wxString WaveformPrefs::HelpPageName()
|
||||||
|
{
|
||||||
|
return "Waveform_Preferences";
|
||||||
|
}
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
ID_DEFAULTS = 10001,
|
ID_DEFAULTS = 10001,
|
||||||
|
|
||||||
|
@ -22,11 +22,17 @@ class wxChoice;
|
|||||||
|
|
||||||
class wxArrayStringEx;
|
class wxArrayStringEx;
|
||||||
|
|
||||||
|
#define WAVEFORM_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Waveform") }
|
||||||
|
|
||||||
class WaveformPrefs final : public PrefsPanel
|
class WaveformPrefs final : public PrefsPanel
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
WaveformPrefs(wxWindow * parent, wxWindowID winid, WaveTrack *wt);
|
WaveformPrefs(wxWindow * parent, wxWindowID winid, WaveTrack *wt);
|
||||||
virtual ~WaveformPrefs();
|
virtual ~WaveformPrefs();
|
||||||
|
virtual ComponentInterfaceSymbol GetSymbol();
|
||||||
|
virtual wxString GetDescription();
|
||||||
|
wxString HelpPageName() override;
|
||||||
|
|
||||||
bool Commit() override;
|
bool Commit() override;
|
||||||
bool ShowsPreviewButton() override;
|
bool ShowsPreviewButton() override;
|
||||||
bool Validate() override;
|
bool Validate() override;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user