![]() |
Audacity 3.2.0
|
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs, DirectoriesPrefs, GUIPrefs, KeyConfigPrefs, MousePrefs, QualityPrefs, SpectrumPrefs and ThemePrefs. More...
#include <PrefsPanel.h>
Classes | |
struct | PrefsItem |
struct | PrefsNode |
struct | Registration |
Public Types | |
using | Factories = std::vector< PrefsPanel::PrefsNode > |
using | Factory = std::function< PrefsPanel *(wxWindow *parent, wxWindowID winid, AudacityProject *) > |
Public Member Functions | |
PrefsPanel (wxWindow *parent, wxWindowID winid, const TranslatableString &title) | |
virtual | ~PrefsPanel () |
virtual void | Preview () |
virtual bool | Commit ()=0 |
virtual PluginPath | GetPath () const override |
virtual VendorSymbol | GetVendor () const override |
virtual wxString | GetVersion () const override |
virtual bool | ShowsPreviewButton () |
virtual void | PopulateOrExchange (ShuttleGui &WXUNUSED(S)) |
virtual ManualPageID | HelpPageName () |
If not empty string, the Help button is added below the panel. More... | |
virtual void | Cancel () |
![]() | |
wxPanelWrapper () | |
wxPanelWrapper (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) | |
bool | Create (wxWindow *parent, wxWindowID winid=wxID_ANY, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize, long style=wxTAB_TRAVERSAL|wxNO_BORDER, const TranslatableString &name=XO("Panel")) |
void | SetLabel (const TranslatableString &label) |
void | SetName (const TranslatableString &name) |
void | SetToolTip (const TranslatableString &toolTip) |
void | SetName () |
![]() | |
wxTabTraversalWrapper (Args &&... args) | |
wxTabTraversalWrapper (const wxTabTraversalWrapper &)=delete | |
wxTabTraversalWrapper (wxTabTraversalWrapper &&)=delete | |
wxTabTraversalWrapper & | operator= (const wxTabTraversalWrapper &)=delete |
wxTabTraversalWrapper & | operator= (wxTabTraversalWrapper &&)=delete |
Static Public Member Functions | |
static Factories & | DefaultFactories () |
Additional Inherited Members | |
![]() | |
virtual | ~ComponentInterface () |
virtual PluginPath | GetPath () const =0 |
virtual ComponentInterfaceSymbol | GetSymbol () const =0 |
virtual VendorSymbol | GetVendor () const =0 |
virtual wxString | GetVersion () const =0 |
virtual TranslatableString | GetDescription () const =0 |
TranslatableString | GetName () const |
Base class for a panel in the PrefsDialog. Classes derived from this class include BatchPrefs, DirectoriesPrefs, GUIPrefs, KeyConfigPrefs, MousePrefs, QualityPrefs, SpectrumPrefs and ThemePrefs.
The interface works like this: Each panel in the preferences dialog must derive from PrefsPanel. You must override Apply() with code to validate fields (returning false if any are bad), updating the global preferences object gPrefs, and instructing the applicable parts of the program to re-read the preference options.
To actually add the new panel, edit the PrefsDialog constructor to append the panel to its list of panels.
Definition at line 49 of file PrefsPanel.h.
using PrefsPanel::Factories = std::vector<PrefsPanel::PrefsNode> |
Definition at line 72 of file PrefsPanel.h.
using PrefsPanel::Factory = std::function< PrefsPanel * ( wxWindow *parent, wxWindowID winid, AudacityProject *) > |
Definition at line 80 of file PrefsPanel.h.
|
inline |
Definition at line 94 of file PrefsPanel.h.
References wxPanelWrapper::SetLabel(), wxPanelWrapper::SetName(), and title.
|
virtual |
Definition at line 79 of file PrefsPanel.cpp.
|
virtual |
Reimplemented in KeyConfigPrefs, and ThemePrefs.
Definition at line 83 of file PrefsPanel.cpp.
Referenced by PrefsDialog::OnCancel().
|
pure virtual |
Implemented in ApplicationPrefs, BatchPrefs, DevicePrefs, DirectoriesPrefs, EffectsPrefs, ExtImportPrefs, GUIPrefs, ImportExportPrefs, KeyConfigPrefs, LibraryPrefs, ModulePrefs, MousePrefs, PlaybackPrefs, QualityPrefs, RecordingPrefs, SpectrumPrefs, ThemePrefs, TracksBehaviorsPrefs, TracksPrefs, WarningsPrefs, and WaveformPrefs.
Referenced by PrefsDialog::OnOK().
|
static |
Definition at line 98 of file PrefsPanel.cpp.
References flag, PathStart, PrefsPanel::PrefsItem::Registry(), Registry::Visit(), and wxT().
|
overridevirtual |
Implements ComponentInterface.
Definition at line 62 of file PrefsPanel.cpp.
References BUILTIN_PREFS_PANEL_PREFIX, ComponentInterface::GetSymbol(), and ComponentInterfaceSymbol::Internal().
|
overridevirtual |
Implements ComponentInterface.
Definition at line 65 of file PrefsPanel.cpp.
References XO().
|
overridevirtual |
Implements ComponentInterface.
Definition at line 68 of file PrefsPanel.cpp.
|
virtual |
If not empty string, the Help button is added below the panel.
Default returns empty string.
Reimplemented in ApplicationPrefs, BatchPrefs, DevicePrefs, DirectoriesPrefs, EffectsPrefs, ExtImportPrefs, GUIPrefs, ImportExportPrefs, KeyConfigPrefs, LibraryPrefs, ModulePrefs, MousePrefs, PlaybackPrefs, QualityPrefs, RecordingPrefs, SpectrumPrefs, ThemePrefs, TracksBehaviorsPrefs, TracksPrefs, WarningsPrefs, and WaveformPrefs.
Definition at line 92 of file PrefsPanel.cpp.
|
inlinevirtual |
Definition at line 120 of file PrefsPanel.h.
Referenced by PrefsDialog::ShuttleAll().
|
inlinevirtual |
Reimplemented in SpectrumPrefs.
Definition at line 105 of file PrefsPanel.h.
Referenced by PrefsDialog::OnOK().
|
virtual |
Reimplemented in SpectrumPrefs, and WaveformPrefs.
Definition at line 87 of file PrefsPanel.cpp.
Referenced by PrefsDialog::PrefsDialog().