![]() |
Audacity 3.2.0
|
Based on ThemeBase, Theme manages image and icon resources. More...
#include <Theme.h>
Public Member Functions | |
| Theme (void) | |
| ~Theme (void) | |
| void | EnsureInitialised () override |
| void | RegisterImagesAndColours () |
Public Member Functions inherited from ThemeBase | |
| ThemeBase (void) | |
| ThemeBase (const ThemeBase &)=delete | |
| ThemeBase & | operator= (const ThemeBase &)=delete |
| virtual | ~ThemeBase (void) |
| virtual void | EnsureInitialised ()=0 |
| FilePath | GetFilePath () |
| void | SetFilePath (const FilePath &path) |
| void | SwitchTheme (teThemeType Theme) |
| void | LoadTheme (teThemeType Theme) |
| void | RegisterImage (NameSet &allNames, int &flags, int &iIndex, char const **pXpm, const wxString &Name) |
| void | RegisterImage (NameSet &allNames, int &flags, int &iIndex, const wxImage &Image, const wxString &Name) |
| void | RegisterColour (NameSet &allNames, int &iIndex, const wxColour &Clr, const wxString &Name) |
| teThemeType | GetFallbackThemeType () |
| void | CreateImageCache () |
| bool | CreateOneImageCache (teThemeType id, bool bBinarySave) |
| bool | ReadImageCache (teThemeType type={}, bool bOkIfNotFound=false) |
| void | LoadThemeComponents (bool bOkIfNotFound=false) |
| void | LoadOneThemeComponents (teThemeType id, bool bOkIfNotFound=false) |
| void | SaveThemeComponents () |
| bool | SaveOneThemeComponents (teThemeType id) |
| void | SaveThemeAsCode () |
| void | WriteImageDefs () |
| Writes a series of Macro definitions that can be used in the include file. More... | |
| void | WriteImageMap () |
| void | WriteOneImageMap (teThemeType id) |
| void | RecolourBitmap (int iIndex, wxColour From, wxColour To) |
| int | ColourDistance (wxColour &From, wxColour &To) |
| wxColour & | Colour (int iIndex) |
| wxBitmap & | Bitmap (int iIndex) |
| wxImage & | Image (int iIndex) |
| wxSize | ImageSize (int iIndex) |
| void | ReplaceImage (int iIndex, wxImage *pImage) |
| void | RotateImageInto (int iTo, int iFrom, bool bClockwise) |
| void | SetBrushColour (wxBrush &Brush, int iIndex) |
| void | SetPenColour (wxPen &Pen, int iIndex) |
| wxImage | MaskedImage (char const **pXpm, char const **pMask) |
| wxImage | MakeImageWithAlpha (wxBitmap &Bmp) |
| void | DeleteUnusedThemes () |
Public Member Functions inherited from Observer::Publisher< ThemeChangeMessage > | |
| Publisher (ExceptionPolicy *pPolicy=nullptr, Alloc a={}) | |
| Constructor supporting type-erased custom allocation/deletion. More... | |
| Publisher (Publisher &&)=default | |
| Publisher & | operator= (Publisher &&)=default |
| Subscription | Subscribe (Callback callback) |
| Connect a callback to the Publisher; later-connected are called earlier. More... | |
| Subscription | Subscribe (Object &obj, Return(Object::*callback)(Args...)) |
| Overload of Subscribe takes an object and pointer-to-member-function. More... | |
Friends | |
| class | AColor |
Additional Inherited Members | |
Public Types inherited from ThemeBase | |
| using | NameSet = std::unordered_set< wxString > |
Public Types inherited from Observer::Publisher< ThemeChangeMessage > | |
| using | message_type = ThemeChangeMessage |
| using | CallbackReturn = std::conditional_t< true, void, bool > |
| using | Callback = std::function< CallbackReturn(const ThemeChangeMessage &) > |
| Type of functions that can be connected to the Publisher. More... | |
Static Public Member Functions inherited from ThemeBase | |
| static bool | LoadPreferredTheme () |
Static Public Attributes inherited from Observer::Publisher< ThemeChangeMessage > | |
| static constexpr bool | notifies_all |
Protected Member Functions inherited from Observer::Publisher< ThemeChangeMessage > | |
| CallbackReturn | Publish (const ThemeChangeMessage &message) |
| Send a message to connected callbacks. More... | |
Protected Attributes inherited from ThemeBase | |
| FilePath | mThemeDir |
| wxArrayString | mBitmapNames |
| std::vector< int > | mBitmapFlags |
| wxArrayString | mColourNames |
| PreferredSystemAppearance | mPreferredSystemAppearance { PreferredSystemAppearance::Light } |
| std::map< Identifier, ThemeSet > | mSets |
| ThemeSet * | mpSet = nullptr |
Based on ThemeBase, Theme manages image and icon resources.
Theme is a class which manages theme resources. It maps sets of ids to the resources and to names of the resources, so that they can be loaded/saved from files.
Theme adds the Audacity specific images to ThemeBase.
|
overridevirtual |
Implements ThemeBase.
Definition at line 137 of file Theme.cpp.
References ThemeSet::bInitialised, ThemeBase::mpSet, and RegisterImagesAndColours().
| void Theme::RegisterImagesAndColours | ( | ) |
Definition at line 169 of file Theme.cpp.
References ThemeSet::bInitialised, ThemeBase::mpSet, and resFlagPaired.
Referenced by EnsureInitialised().