Audacity 3.2.0
Classes | Namespaces | Macros | Typedefs | Functions | Variables
Theme.cpp File Reference
#include "Theme.h"
#include <map>
#include <wx/wxprec.h>
#include <wx/brush.h>
#include <wx/pen.h>
#include <wx/file.h>
#include <wx/ffile.h>
#include <wx/txtstrm.h>
#include <wx/wfstream.h>
#include <wx/mstream.h>
#include <wx/settings.h>
#include <regex>
#include "AllThemeResources.h"
#include "BasicUI.h"
#include "FileNames.h"
#include "Prefs.h"
#include "ImageManipulation.h"
#include "Internat.h"
#include "MemoryX.h"
Include dependency graph for Theme.cpp:

Go to the source code of this file.

Classes

class  SourceOutputStream
 Helper class based on wxOutputStream used to get a png file in text format. More...
 

Namespaces

namespace  anonymous_namespace{Theme.cpp}
 

Macros

#define THEME_INITS
 

Typedefs

using ThemeCacheLookup = std::map< EnumValueSymbol, const ThemeBase::RegisteredTheme & >
 

Functions

wxString anonymous_namespace{Theme.cpp}::ThemeFilePrefix (teThemeType id)
 
FilePath anonymous_namespace{Theme.cpp}::ThemeSubdir (const FilePath &themeDir, Identifier id)
 Has the side-effect of ensuring existence of the directory. More...
 
FilePath anonymous_namespace{Theme.cpp}::ThemeComponentsDir (const FilePath &themeDir, Identifier id)
 Has the side-effect of ensuring existence of the directory. More...
 
FilePath anonymous_namespace{Theme.cpp}::ThemeImageDefsAsCee (const FilePath &themeDir)
 
FilePath anonymous_namespace{Theme.cpp}::ThemeComponent (const wxString &dir, const wxString &Str)
 
static ThemeCacheLookupGetThemeCacheLookup ()
 

Variables

THEME_API Theme theTheme
 
constexpr int anonymous_namespace{Theme.cpp}::iColSize = 10
 
constexpr auto anonymous_namespace{Theme.cpp}::ImageCacheFileName = L"ImageCache.png"
 
constexpr auto anonymous_namespace{Theme.cpp}::ImageMapFileName = L"ImageCache.htm"
 
constexpr auto anonymous_namespace{Theme.cpp}::ColorFileName = L"Colors.txt"
 
constexpr auto anonymous_namespace{Theme.cpp}::ThemeCacheFileName = L"ThemeAsCeeCode.h"
 
const int ImageCacheWidth = 440
 
const int ImageCacheHeight = 836
 

Macro Definition Documentation

◆ THEME_INITS

#define THEME_INITS

Typedef Documentation

◆ ThemeCacheLookup

Definition at line 193 of file Theme.cpp.

Function Documentation

◆ GetThemeCacheLookup()

static ThemeCacheLookup & GetThemeCacheLookup ( )
static

Definition at line 196 of file Theme.cpp.

197{
198 static ThemeCacheLookup theMap;
199 return theMap;
200}
std::map< EnumValueSymbol, const ThemeBase::RegisteredTheme & > ThemeCacheLookup
Definition: Theme.cpp:194

Referenced by ThemeBase::CreateImageCache(), ThemeBase::LoadThemeComponents(), ThemeBase::ReadImageCache(), ThemeBase::RegisteredTheme::RegisteredTheme(), ThemeBase::WriteImageMap(), and ThemeBase::RegisteredTheme::~RegisteredTheme().

Here is the caller graph for this function:

Variable Documentation

◆ ImageCacheHeight

const int ImageCacheHeight = 836

Definition at line 612 of file Theme.cpp.

Referenced by ThemeBase::CreateOneImageCache().

◆ ImageCacheWidth

const int ImageCacheWidth = 440

◆ theTheme

THEME_API Theme theTheme

Definition at line 82 of file Theme.cpp.

Referenced by AboutDialog::AboutDialog(), TranscriptionToolBar::AddButton(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::AddStuck(), SelectionBar::AddTitle(), TimeSignatureToolBar::AddTitle(), AdornedRulerPanel::AdornedRulerPanel(), AlphaBlend(), AColor::ApplyUpdatedImages(), ProjectWindow::ApplyUpdatedTheme(), ASlider::ASlider(), auStaticText::auStaticText(), AColor::Bevel2(), AColor::BevelTrackInfo(), EffectUIHost::BuildTopBar(), AColor::ButtonStretch(), ThemePrefs::Cancel(), CommonTrackInfo::CloseTitleDrawFunction(), GUIPrefs::Commit(), ThemePrefs::Commit(), anonymous_namespace{RealtimeEffectPanel.cpp}::RealtimeEffectControl::Create(), ToolBarButtons::CreateButton(), CreateStdButtonSizer(), CursorColour(), WaveChannelVRulerControls::DoDraw(), AdornedRulerPanel::DoDrawMarks(), AdornedRulerPanel::DoDrawPlayRegion(), AdornedRulerPanel::DoDrawPlayRegionLimits(), LabelTrackView::Draw(), NoteTrackAffordanceControls::Draw(), WaveTrackAffordanceControls::Draw(), TimeTrackVRulerControls::Draw(), RulerUpdater::Label::Draw(), CommonTrackInfo::DrawCloseButton(), anonymous_namespace{TimeTrackView.cpp}::DrawHorzRulerAndCurve(), CommonTrackInfo::DrawItems(), anonymous_namespace{NoteTrackControls.cpp}::DrawLabelControls(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack(), ClipButtonSpecializations< ClipButtonId::Pitch >::DrawOnClip(), ClipButtonSpecializations< ClipButtonId::Speed >::DrawOnClip(), FrequencyPlotDialog::DrawPlot(), TrackArt::DrawSyncLockTiles(), LWSlider::DrawToBitmap(), anonymous_namespace{TrackPanel.cpp}::DrawTrackName(), ErrorReportDialog::ErrorReportDialog(), WaveTrackControls::GainSlider(), LabelTrackView::GetGlyph(), anonymous_namespace{PlayIndicatorOverlay.cpp}::GetIndicatorBitmap(), HighlitClipButtonHandle::Highlight(), HtmlColourOfIndex(), AColor::Init(), InitProjectWindow(), NumericTextCtrl::Layout(), ThemeBase::LoadPreferredTheme(), ThemeBase::LoadTheme(), main(), ControlToolBar::MakeAlternateImages(), ToolBar::MakeAlternateImages(), TranscriptionToolBar::MakeAlternateImages(), AudioSetupToolBar::MakeAudioSetupButton(), ToolBar::MakeButton(), MixerBoard::MakeButtonBitmap(), ToolBar::MakeMacRecoloredImage(), ToolBar::MakeMacRecoloredImageSize(), ToolBar::MakeRecoloredImageSize(), SelectionBar::MakeSetupButton(), cloud::ShareAudioToolbar::MakeShareAudioButton(), WaveTrackAffordanceControls::MakeTextEditHelper(), ToolsToolBar::MakeTool(), anonymous_namespace{SplashDialog.cpp}::MakeWhatsNewText(), CommonTrackInfo::MinimizeSyncLockDrawFunction(), MixerBoard::MixerBoard(), MultiDialog::MultiDialog(), ToolManager::OnIndicatorPaint(), App::OnInit(), AudacityApp::OnInit(), ThemePrefs::OnLoadThemeCache(), ThemePrefs::OnLoadThemeComponents(), anonymous_namespace{RealtimeEffectPanel.cpp}::RealtimeEffectControl::OnPaint(), EqualizationPanel::OnPaint(), ToolBarResizer::OnPaint(), ToolBar::OnPaint(), ToolDock::OnPaint(), NumericTextCtrl::OnPaint(), EffectAutoDuck::Panel::OnPaint(), EffectCompressorPanel::OnPaint(), EffectScienFilterPanel::OnPaint(), MixerTrackCluster::OnPaint(), MeterPanel::OnPaint(), ToolFrame::OnPaint(), ThemePrefs::OnReadThemeInternal(), ThemePrefs::OnSaveThemeAsCode(), ThemePrefs::OnSaveThemeCache(), ThemePrefs::OnSaveThemeComponents(), ThemedWindowWrapper< WindowBase >::OnThemeChange(), ThemedButtonWrapper< ButtonBase >::OnThemeChange(), ThemedAButtonWrapper< AButtonBase >::OnThemeChange(), OverlayImage(), WaveTrackControls::PanSlider(), FrequencyPlotDialog::Populate(), cloud::ShareAudioToolbar::Populate(), AudioSetupToolBar::Populate(), ControlToolBar::Populate(), CutCopyPasteToolBar::Populate(), DeviceToolBar::Populate(), EditToolBar::Populate(), MeterToolBar::Populate(), SelectionBar::Populate(), SnappingToolBar::Populate(), TimeSignatureToolBar::Populate(), ToolsToolBar::Populate(), TranscriptionToolBar::Populate(), DevicePrefs::PopulateOrExchange(), AColor::PreComputeGradient(), ProjectWindow::ProjectWindow(), AdornedRulerPanel::ReCreateButtons(), Ruler::Ruler(), cloud::audiocom::ShareAudioDialog::InitialStatePanel::SetAnonymousState(), ThemedWindowWrapper< WindowBase >::SetBackgroundColorIndex(), ThemedButtonWrapper< ButtonBase >::SetBackgroundColorIndex(), ThemedAButtonWrapper< AButtonBase >::SetBackgroundColorIndex(), ThemedButtonWrapper< ButtonBase >::SetBitmapCurrentIndex(), ThemedButtonWrapper< ButtonBase >::SetBitmapFocusIndex(), ThemedButtonWrapper< ButtonBase >::SetBitmapIndex(), ThemedButtonWrapper< ButtonBase >::SetBitmapLabelIndex(), ThemedButtonWrapper< ButtonBase >::SetBitmapPressedIndex(), TrackArtist::SetColours(), ThemedWindowWrapper< WindowBase >::SetForegroundColorIndex(), ThemedAButtonWrapper< AButtonBase >::SetForegroundColorIndex(), ThemedAButtonWrapper< AButtonBase >::SetImageIndices(), LogWindow::Show(), HelpSystem::ShowHtmlText(), ThemedAButtonWrapper< AButtonBase >::ThemedAButtonWrapper(), ThemedButtonWrapper< ButtonBase >::ThemedButtonWrapper(), ThemedWindowWrapper< WindowBase >::ThemedWindowWrapper(), ToolBarGrabber::ToolBarGrabber(), ToolDock::ToolDock(), MixerBoard::UpdatePrefs(), cloud::audiocom::ShareAudioDialog::InitialStatePanel::UpdateUserData(), and AColor::UseThemeColour().