![]() |
Audacity 3.2.0
|
A PrefsPanel that configures dynamic loading of Theme icons and colours. More...
#include <ThemePrefs.h>
Public Member Functions | |
ThemePrefs (wxWindow *parent, wxWindowID winid) | |
~ThemePrefs (void) | |
ComponentInterfaceSymbol | GetSymbol () const override |
TranslatableString | GetDescription () const override |
bool | Commit () override |
Update the preferences stored on disk. More... | |
void | Cancel () override |
ManualPageID | HelpPageName () override |
If not empty string, the Help button is added below the panel. More... | |
![]() | |
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 |
Private Member Functions | |
void | Populate () |
Creates the dialog and its contents. More... | |
void | PopulateOrExchange (ShuttleGui &S) override |
Create the dialog contents, or exchange data with it. More... | |
void | OnLoadThemeComponents (wxCommandEvent &e) |
Load Theme from multiple png files. More... | |
void | OnSaveThemeComponents (wxCommandEvent &e) |
Save Theme to multiple png files. More... | |
void | OnLoadThemeCache (wxCommandEvent &e) |
Load Theme from single png file. More... | |
void | OnSaveThemeCache (wxCommandEvent &e) |
Save Themes, each to a single png file. More... | |
void | OnReadThemeInternal (wxCommandEvent &e) |
Read Theme from internal storage. More... | |
void | OnSaveThemeAsCode (wxCommandEvent &e) |
Save Theme as C source code. More... | |
Additional Inherited Members | |
![]() | |
using | Factories = std::vector< PrefsPanel::PrefsNode > |
using | Factory = std::function< PrefsPanel *(wxWindow *parent, wxWindowID winid, AudacityProject *) > |
![]() | |
static Factories & | DefaultFactories () |
A PrefsPanel that configures dynamic loading of Theme icons and colours.
Provides:
Definition at line 25 of file ThemePrefs.h.
ThemePrefs::ThemePrefs | ( | wxWindow * | parent, |
wxWindowID | winid | ||
) |
Definition at line 75 of file ThemePrefs.cpp.
References Populate().
ThemePrefs::~ThemePrefs | ( | void | ) |
Definition at line 85 of file ThemePrefs.cpp.
|
overridevirtual |
Reimplemented from PrefsPanel.
Definition at line 253 of file ThemePrefs.cpp.
References AColor::ApplyUpdatedImages(), ThemeBase::DeleteUnusedThemes(), ThemeBase::LoadPreferredTheme(), and theTheme.
|
overridevirtual |
Update the preferences stored on disk.
Implements PrefsPanel.
Definition at line 242 of file ThemePrefs.cpp.
References AColor::ApplyUpdatedImages(), ThemeBase::DeleteUnusedThemes(), eIsSavingToPrefs, ThemeBase::LoadPreferredTheme(), PopulateOrExchange(), S, and theTheme.
|
overridevirtual |
Implements ComponentInterface.
Definition at line 94 of file ThemePrefs.cpp.
References XO().
|
overridevirtual |
Implements ComponentInterface.
Definition at line 89 of file ThemePrefs.cpp.
References THEME_PREFS_PLUGIN_SYMBOL.
|
overridevirtual |
If not empty string, the Help button is added below the panel.
Default returns empty string.
Reimplemented from PrefsPanel.
Definition at line 99 of file ThemePrefs.cpp.
|
private |
Load Theme from single png file.
Definition at line 206 of file ThemePrefs.cpp.
References AColor::ApplyUpdatedImages(), ThemeBase::SwitchTheme(), and theTheme.
|
private |
Load Theme from multiple png files.
Definition at line 189 of file ThemePrefs.cpp.
References AColor::ApplyUpdatedImages(), ThemeBase::LoadThemeComponents(), and theTheme.
|
private |
Read Theme from internal storage.
Definition at line 224 of file ThemePrefs.cpp.
References AColor::ApplyUpdatedImages(), ThemeBase::GetFallbackThemeType(), ThemeBase::SwitchTheme(), and theTheme.
|
private |
Save Theme as C source code.
Definition at line 232 of file ThemePrefs.cpp.
References ConfirmSave(), ThemeBase::SaveThemeAsCode(), theTheme, and ThemeBase::WriteImageDefs().
|
private |
Save Themes, each to a single png file.
Definition at line 214 of file ThemePrefs.cpp.
References ConfirmSave(), ThemeBase::CreateImageCache(), theTheme, and ThemeBase::WriteImageMap().
|
private |
Save Theme to multiple png files.
Definition at line 197 of file ThemePrefs.cpp.
References ConfirmSave(), ThemeBase::SaveThemeComponents(), and theTheme.
|
private |
Creates the dialog and its contents.
Definition at line 105 of file ThemePrefs.cpp.
References eIsCreatingFromPrefs, PopulateOrExchange(), and S.
Referenced by ThemePrefs().
|
overrideprivate |
Create the dialog contents, or exchange data with it.
Definition at line 119 of file ThemePrefs.cpp.
References idLoadThemeCache, idLoadThemeComponents, idReadThemeInternal, idSaveThemeAsCode, idSaveThemeCache, idSaveThemeComponents, S, Verbatim(), XO(), and XXO().
Referenced by Commit(), and Populate().