mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +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();
|
||||
}
|
||||
|
||||
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.
|
||||
void BatchPrefs::Populate( )
|
||||
{
|
||||
|
@ -18,11 +18,17 @@
|
||||
|
||||
class ShuttleGui;
|
||||
|
||||
#define BATCH_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Batch") }
|
||||
|
||||
class BatchPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
BatchPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~BatchPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
wxString HelpPageName() override;
|
||||
|
||||
bool Commit() 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()
|
||||
{
|
||||
// First any pre-processing for constructing the GUI.
|
||||
@ -85,6 +101,7 @@ void DevicePrefs::Populate()
|
||||
OnHost(e);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Get names of device hosts.
|
||||
*/
|
||||
@ -403,11 +420,6 @@ bool DevicePrefs::Commit()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString DevicePrefs::HelpPageName()
|
||||
{
|
||||
return "Devices_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *DevicePrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -20,11 +20,16 @@ class wxChoice;
|
||||
class ShuttleGui;
|
||||
class wxArrayStringEx;
|
||||
|
||||
#define DEVICE_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Device") }
|
||||
|
||||
class DevicePrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
DevicePrefs(wxWindow * parent, wxWindowID winid);
|
||||
virtual ~DevicePrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() 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.
|
||||
void DirectoriesPrefs::Populate()
|
||||
{
|
||||
@ -271,11 +287,6 @@ bool DirectoriesPrefs::Commit()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString DirectoriesPrefs::HelpPageName()
|
||||
{
|
||||
return "Directories_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *DirectoriesPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -18,11 +18,16 @@ class ShuttleGui;
|
||||
class wxStaticText;
|
||||
class wxTextCtrl;
|
||||
|
||||
#define DIRECTORIES_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Directories") }
|
||||
|
||||
class DirectoriesPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
DirectoriesPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~DirectoriesPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
bool Validate() 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()
|
||||
{
|
||||
//------------------------- Main section --------------------
|
||||
@ -186,11 +201,6 @@ bool EffectsPrefs::Commit()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString EffectsPrefs::HelpPageName()
|
||||
{
|
||||
return "Effects_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *EffectsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -19,11 +19,16 @@
|
||||
|
||||
class ShuttleGui;
|
||||
|
||||
#define EFFECTS_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Effects") }
|
||||
|
||||
class EffectsPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
EffectsPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~EffectsPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() 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.
|
||||
void ExtImportPrefs::Populate()
|
||||
{
|
||||
@ -674,11 +689,6 @@ void ExtImportPrefs::OnRuleTableCellClick (wxGridEvent& event)
|
||||
event.Skip();
|
||||
}
|
||||
|
||||
wxString ExtImportPrefs::HelpPageName()
|
||||
{
|
||||
return "Extended_Import_Preferences";
|
||||
}
|
||||
|
||||
ExtImportPrefsDropTarget::ExtImportPrefsDropTarget(wxDataObject *dataObject)
|
||||
: wxDropTarget(dataObject)
|
||||
{
|
||||
|
@ -28,6 +28,8 @@ class ExtImportPrefs;
|
||||
class Grid;
|
||||
class ShuttleGui;
|
||||
|
||||
#define EXT_IMPORT_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Ext Import") }
|
||||
|
||||
class ExtImportPrefsDropTarget final : public wxDropTarget
|
||||
{
|
||||
public:
|
||||
@ -49,6 +51,9 @@ class ExtImportPrefs final : public PrefsPanel
|
||||
public:
|
||||
ExtImportPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~ExtImportPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() 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(
|
||||
wxArrayStringEx *pChoices, wxArrayStringEx *pCodes)
|
||||
{
|
||||
@ -253,11 +268,6 @@ bool GUIPrefs::Commit()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString GUIPrefs::HelpPageName()
|
||||
{
|
||||
return "Interface_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *GUIPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -20,11 +20,16 @@
|
||||
class ShuttleGui;
|
||||
class wxArrayStringEx;
|
||||
|
||||
#define GUI_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("GUI") }
|
||||
|
||||
class GUIPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
GUIPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~GUIPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() 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.
|
||||
void ImportExportPrefs::Populate()
|
||||
{
|
||||
@ -113,11 +128,6 @@ bool ImportExportPrefs::Commit()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString ImportExportPrefs::HelpPageName()
|
||||
{
|
||||
return "Import_-_Export_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *ImportExportPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -19,11 +19,16 @@
|
||||
|
||||
class ShuttleGui;
|
||||
|
||||
#define IMPORT_EXPORT_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("IMPORT EXPORT") }
|
||||
|
||||
class ImportExportPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
ImportExportPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~ImportExportPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() 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()
|
||||
{
|
||||
ShuttleGui S(this, eIsCreatingFromPrefs);
|
||||
@ -673,11 +688,6 @@ void KeyConfigPrefs::Cancel()
|
||||
return;
|
||||
}
|
||||
|
||||
wxString KeyConfigPrefs::HelpPageName()
|
||||
{
|
||||
return "Keyboard_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *KeyConfigPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -27,10 +27,15 @@ class KeyView;
|
||||
struct NormalizedKeyString;
|
||||
enum ViewByType : int;
|
||||
|
||||
#define KEY_CONFIG_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Key Config") }
|
||||
|
||||
class KeyConfigPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
KeyConfigPrefs(wxWindow * parent, wxWindowID winid, const CommandID &name);
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
void Cancel() 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.
|
||||
void LibraryPrefs::Populate()
|
||||
{
|
||||
@ -252,11 +267,6 @@ bool LibraryPrefs::Commit()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString LibraryPrefs::HelpPageName()
|
||||
{
|
||||
return "Libraries_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *LibraryPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -20,11 +20,16 @@
|
||||
class wxStaticText;
|
||||
class ShuttleGui;
|
||||
|
||||
#define LIBRARY_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Library") }
|
||||
|
||||
class LibraryPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
LibraryPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~LibraryPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() 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()
|
||||
{
|
||||
// First any pre-processing for constructing the GUI.
|
||||
@ -284,11 +299,6 @@ bool MidiIOPrefs::Validate()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString MidiIOPrefs::HelpPageName()
|
||||
{
|
||||
return "MIDI_Devices_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *MidiIOPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -26,11 +26,16 @@ class ShuttleGui;
|
||||
|
||||
class wxArrayStringEx;
|
||||
|
||||
#define MIDI_IO_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Midi IO") }
|
||||
|
||||
class MidiIOPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
MidiIOPrefs(wxWindow * parent, wxWindowID winid);
|
||||
virtual ~MidiIOPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
bool Validate() 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(){
|
||||
wxString str;
|
||||
long dummy;
|
||||
@ -165,11 +180,6 @@ void ModulePrefs::SetModuleStatus(const FilePath &fname, int iStatus){
|
||||
gPrefs->Flush();
|
||||
}
|
||||
|
||||
wxString ModulePrefs::HelpPageName()
|
||||
{
|
||||
return "Modules_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *ModulePrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -30,11 +30,16 @@ enum {
|
||||
};
|
||||
|
||||
|
||||
#define MODULE_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Module") }
|
||||
|
||||
class ModulePrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
ModulePrefs(wxWindow * parent, wxWindowID winid);
|
||||
~ModulePrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() 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.
|
||||
void MousePrefs::Populate()
|
||||
{
|
||||
@ -203,11 +218,6 @@ bool MousePrefs::Commit()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString MousePrefs::HelpPageName()
|
||||
{
|
||||
return "Mouse_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *MousePrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -16,11 +16,16 @@
|
||||
class wxListCtrl;
|
||||
class ShuttleGui;
|
||||
|
||||
#define MOUSE_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Mouse") }
|
||||
|
||||
class MousePrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
MousePrefs(wxWindow * parent, wxWindowID winid);
|
||||
~MousePrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() 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()
|
||||
{
|
||||
//------------------------- Main section --------------------
|
||||
@ -168,11 +183,6 @@ bool PlaybackPrefs::Commit()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString PlaybackPrefs::HelpPageName()
|
||||
{
|
||||
return "Playback_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *PlaybackPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -18,11 +18,16 @@
|
||||
|
||||
class ShuttleGui;
|
||||
|
||||
#define PLAYBACK_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Playback") }
|
||||
|
||||
class PlaybackPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
PlaybackPrefs(wxWindow * parent, wxWindowID winid);
|
||||
virtual ~PlaybackPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
@ -77,6 +77,15 @@
|
||||
#include "../widgets/WindowAccessible.h"
|
||||
#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)
|
||||
EVT_BUTTON(wxID_OK, PrefsDialog::OnOK)
|
||||
EVT_BUTTON(wxID_CANCEL, PrefsDialog::OnCancel)
|
||||
|
@ -34,10 +34,13 @@ PrefsPanel.
|
||||
#define __AUDACITY_PREFS_PANEL__
|
||||
|
||||
#include "../widgets/wxPanelWrapper.h" // to inherit
|
||||
#include "../include/audacity/ComponentInterface.h"
|
||||
|
||||
/* A few constants for an attempt at semi-uniformity */
|
||||
#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
|
||||
* border on each side */
|
||||
#define RADIO_BUTTON_BORDER 5
|
||||
@ -46,7 +49,7 @@ PrefsPanel.
|
||||
|
||||
class ShuttleGui;
|
||||
|
||||
class PrefsPanel /* not final */ : public wxPanelWrapper
|
||||
class PrefsPanel /* not final */ : public wxPanelWrapper, ComponentInterface
|
||||
{
|
||||
public:
|
||||
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 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
|
||||
// Default returns false
|
||||
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.
|
||||
void ProjectsPrefs::Populate()
|
||||
{
|
||||
@ -84,11 +99,6 @@ bool ProjectsPrefs::Commit()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString ProjectsPrefs::HelpPageName()
|
||||
{
|
||||
return "Projects_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *ProjectsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -19,11 +19,16 @@
|
||||
|
||||
class ShuttleGui;
|
||||
|
||||
#define PROJECTS_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Projects") }
|
||||
|
||||
class ProjectsPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
ProjectsPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~ProjectsPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() 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()
|
||||
{
|
||||
// First any pre-processing for constructing the GUI.
|
||||
@ -262,11 +277,6 @@ bool QualityPrefs::Commit()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString QualityPrefs::HelpPageName()
|
||||
{
|
||||
return "Quality_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *QualityPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -25,11 +25,15 @@ enum DitherType : unsigned;
|
||||
|
||||
class wxArrayStringEx;
|
||||
|
||||
#define QUALITY_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Quality") }
|
||||
|
||||
class QualityPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
QualityPrefs(wxWindow * parent, wxWindowID winid);
|
||||
virtual ~QualityPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() 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()
|
||||
{
|
||||
//------------------------- Main section --------------------
|
||||
@ -290,11 +305,6 @@ void RecordingPrefs::OnToggleCustomName(wxCommandEvent & /* Evt */)
|
||||
mToggleCustomName->Enable(mUseCustomTrackName);
|
||||
}
|
||||
|
||||
wxString RecordingPrefs::HelpPageName()
|
||||
{
|
||||
return "Recording_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *RecordingPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -19,11 +19,16 @@
|
||||
class wxTextCtrl;
|
||||
class ShuttleGui;
|
||||
|
||||
#define RECORDING_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Recording") }
|
||||
|
||||
class RecordingPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
RecordingPrefs(wxWindow * parent, wxWindowID winid);
|
||||
virtual ~RecordingPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
void PopulateOrExchange(ShuttleGui & S) override;
|
||||
|
@ -65,6 +65,28 @@ SpectrumPrefs::~SpectrumPrefs()
|
||||
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 {
|
||||
ID_WINDOW_SIZE = 10001,
|
||||
#ifdef EXPERIMENTAL_ZERO_PADDED_SPECTROGRAMS
|
||||
@ -534,18 +556,6 @@ void SpectrumPrefs::EnableDisableSTFTOnlyControls()
|
||||
#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)
|
||||
EVT_CHOICE(ID_WINDOW_SIZE, SpectrumPrefs::OnWindowSize)
|
||||
EVT_CHECKBOX(ID_DEFAULTS, SpectrumPrefs::OnDefaults)
|
||||
|
@ -39,11 +39,16 @@ class ShuttleGui;
|
||||
class SpectrogramSettings;
|
||||
class WaveTrack;
|
||||
|
||||
#define SPECTRUM_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Spectrum") }
|
||||
|
||||
class SpectrumPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
SpectrumPrefs(wxWindow * parent, wxWindowID winid, WaveTrack *wt);
|
||||
virtual ~SpectrumPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
void Preview() override;
|
||||
bool Commit() 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.
|
||||
void ThemePrefs::Populate()
|
||||
{
|
||||
|
@ -20,12 +20,18 @@
|
||||
|
||||
class ShuttleGui;
|
||||
|
||||
#define THEME_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Theme") }
|
||||
|
||||
class ThemePrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
ThemePrefs(wxWindow * parent, wxWindowID winid);
|
||||
~ThemePrefs(void);
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() override;
|
||||
wxString HelpPageName() override;
|
||||
|
||||
private:
|
||||
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()
|
||||
{
|
||||
static auto string = wxT("/GUI/ScrollBeyondZero");
|
||||
@ -119,11 +134,6 @@ bool TracksBehaviorsPrefs::Commit()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString TracksBehaviorsPrefs::HelpPageName()
|
||||
{
|
||||
return "Tracks_Behaviors_Preferences";
|
||||
}
|
||||
|
||||
TracksBehaviorsPrefsFactory::TracksBehaviorsPrefsFactory()
|
||||
{
|
||||
}
|
||||
|
@ -19,11 +19,16 @@
|
||||
class ShuttleGui;
|
||||
class wxArrayStringEx;
|
||||
|
||||
#define TRACKS_BEHAVIORS_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Tracks Behaviors") }
|
||||
|
||||
class TracksBehaviorsPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
TracksBehaviorsPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~TracksBehaviorsPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() 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()
|
||||
{
|
||||
// Keep view choices and codes in proper correspondence --
|
||||
@ -392,11 +407,6 @@ bool TracksPrefs::Commit()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString TracksPrefs::HelpPageName()
|
||||
{
|
||||
return "Tracks_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *TracksPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -21,11 +21,16 @@
|
||||
|
||||
class ShuttleGui;
|
||||
|
||||
#define TRACKS_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Tracks") }
|
||||
|
||||
class TracksPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
TracksPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~TracksPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() 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()
|
||||
{
|
||||
//------------------------- Main section --------------------
|
||||
@ -91,11 +106,6 @@ bool WarningsPrefs::Commit()
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString WarningsPrefs::HelpPageName()
|
||||
{
|
||||
return "Warnings_Preferences";
|
||||
}
|
||||
|
||||
PrefsPanel *WarningsPrefsFactory::operator () (wxWindow *parent, wxWindowID winid)
|
||||
{
|
||||
wxASSERT(parent); // to justify safenew
|
||||
|
@ -19,11 +19,16 @@
|
||||
|
||||
class ShuttleGui;
|
||||
|
||||
#define WARNINGS_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Warnings") }
|
||||
|
||||
class WarningsPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
WarningsPrefs(wxWindow * parent, wxWindowID winid);
|
||||
~WarningsPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
|
||||
bool Commit() 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 {
|
||||
ID_DEFAULTS = 10001,
|
||||
|
||||
|
@ -22,11 +22,17 @@ class wxChoice;
|
||||
|
||||
class wxArrayStringEx;
|
||||
|
||||
#define WAVEFORM_PREFS_PLUGIN_SYMBOL ComponentInterfaceSymbol{ XO("Waveform") }
|
||||
|
||||
class WaveformPrefs final : public PrefsPanel
|
||||
{
|
||||
public:
|
||||
WaveformPrefs(wxWindow * parent, wxWindowID winid, WaveTrack *wt);
|
||||
virtual ~WaveformPrefs();
|
||||
virtual ComponentInterfaceSymbol GetSymbol();
|
||||
virtual wxString GetDescription();
|
||||
wxString HelpPageName() override;
|
||||
|
||||
bool Commit() override;
|
||||
bool ShowsPreviewButton() override;
|
||||
bool Validate() override;
|
||||
|
Loading…
x
Reference in New Issue
Block a user