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... | |
Public Member Functions inherited from PrefsPanel | |
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 |
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 | |
Public Types inherited from PrefsPanel | |
using | Factories = std::vector< PrefsPanel::PrefsNode > |
using | Factory = std::function< PrefsPanel *(wxWindow *parent, wxWindowID winid, AudacityProject *) > |
Static Public Member Functions inherited from PrefsPanel | |
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 60 of file ThemePrefs.cpp.
ThemePrefs::~ThemePrefs | ( | void | ) |
Definition at line 70 of file ThemePrefs.cpp.
|
overridevirtual |
Reimplemented from PrefsPanel.
Definition at line 232 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 221 of file ThemePrefs.cpp.
References AColor::ApplyUpdatedImages(), ThemeBase::DeleteUnusedThemes(), eIsSavingToPrefs, ThemeBase::LoadPreferredTheme(), PopulateOrExchange(), S, and theTheme.
|
overridevirtual |
Implements ComponentInterface.
Definition at line 79 of file ThemePrefs.cpp.
References XO().
|
overridevirtual |
Implements ComponentInterface.
Definition at line 74 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 84 of file ThemePrefs.cpp.
|
private |
Load Theme from single png file.
Definition at line 189 of file ThemePrefs.cpp.
References AColor::ApplyUpdatedImages(), ThemeBase::SwitchTheme(), and theTheme.
|
private |
Load Theme from multiple png files.
Definition at line 174 of file ThemePrefs.cpp.
References AColor::ApplyUpdatedImages(), ThemeBase::LoadThemeComponents(), and theTheme.
|
private |
Read Theme from internal storage.
Definition at line 205 of file ThemePrefs.cpp.
References AColor::ApplyUpdatedImages(), ThemeBase::GetFallbackThemeType(), ThemeBase::SwitchTheme(), and theTheme.
|
private |
Save Theme as C source code.
Definition at line 213 of file ThemePrefs.cpp.
References ThemeBase::SaveThemeAsCode(), theTheme, and ThemeBase::WriteImageDefs().
|
private |
Save Themes, each to a single png file.
Definition at line 197 of file ThemePrefs.cpp.
References ThemeBase::CreateImageCache(), theTheme, and ThemeBase::WriteImageMap().
|
private |
Save Theme to multiple png files.
Definition at line 182 of file ThemePrefs.cpp.
References ThemeBase::SaveThemeComponents(), and theTheme.
|
private |
Creates the dialog and its contents.
Definition at line 90 of file ThemePrefs.cpp.
References eIsCreatingFromPrefs, PopulateOrExchange(), and S.
|
overrideprivate |
Create the dialog contents, or exchange data with it.
Definition at line 104 of file ThemePrefs.cpp.
References idLoadThemeCache, idLoadThemeComponents, idReadThemeInternal, idSaveThemeAsCode, idSaveThemeCache, idSaveThemeComponents, S, Verbatim(), XO(), and XXO().
Referenced by Commit(), and Populate().