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 |
struct | Traits |
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 () |
Public Member Functions inherited from wxPanelWrapper | |
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 () |
Public Member Functions inherited from wxTabTraversalWrapper< wxPanel > | |
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 | |
Private Member Functions inherited from ComponentInterface | |
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 47 of file PrefsPanel.cpp.
|
virtual |
Reimplemented in anonymous_namespace{AudioComPrefsPanel.cpp}::AudioComPrefsPanel, KeyConfigPrefs, and ThemePrefs.
Definition at line 51 of file PrefsPanel.cpp.
Referenced by PrefsDialog::OnCancel().
|
pure virtual |
Implemented in LibraryPrefs, anonymous_namespace{AudioComPrefsPanel.cpp}::AudioComPrefsPanel, ApplicationPrefs, BatchPrefs, DevicePrefs, DirectoriesPrefs, EffectsPrefs, ExtImportPrefs, GUIPrefs, ImportExportPrefs, KeyConfigPrefs, MidiIOPrefs, ModulePrefs, PlaybackPrefs, QualityPrefs, RecordingPrefs, SpectrumPrefs, ThemePrefs, TracksBehaviorsPrefs, TracksPrefs, and WaveformPrefs.
Referenced by PrefsDialog::OnOK().
|
static |
Definition at line 66 of file PrefsPanel.cpp.
References PrefsPanel::PrefsItem::expanded, PrefsPanel::PrefsItem::factory, factory, flag, Registry::NoOp, PathStart, PrefsPanel::PrefsItem::Registry(), Registry::Visit(), and wxT().
|
overridevirtual |
Implements ComponentInterface.
Definition at line 30 of file PrefsPanel.cpp.
References BUILTIN_PREFS_PANEL_PREFIX, ComponentInterface::GetSymbol(), and ComponentInterfaceSymbol::Internal().
|
overridevirtual |
Implements ComponentInterface.
Definition at line 33 of file PrefsPanel.cpp.
References XO().
|
overridevirtual |
Implements ComponentInterface.
Definition at line 36 of file PrefsPanel.cpp.
|
virtual |
If not empty string, the Help button is added below the panel.
Default returns empty string.
Reimplemented in LibraryPrefs, ApplicationPrefs, BatchPrefs, DevicePrefs, DirectoriesPrefs, EffectsPrefs, ExtImportPrefs, GUIPrefs, ImportExportPrefs, KeyConfigPrefs, MidiIOPrefs, ModulePrefs, PlaybackPrefs, QualityPrefs, RecordingPrefs, SpectrumPrefs, ThemePrefs, TracksBehaviorsPrefs, TracksPrefs, and WaveformPrefs.
Definition at line 60 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 55 of file PrefsPanel.cpp.
Referenced by PrefsDialog::PrefsDialog().