Audacity 3.2.0
Classes | Typedefs | Enumerations | Functions | Variables
Theme.h File Reference
#include <map>
#include <unordered_set>
#include <vector>
#include <optional>
#include <wx/arrstr.h>
#include <wx/defs.h>
#include <wx/gdicmn.h>
#include "ComponentInterfaceSymbol.h"
#include "Observer.h"
#include "Prefs.h"
Include dependency graph for Theme.h:

Go to the source code of this file.

Classes

class  FlowPacker
 A cursor for iterating the theme bitmap. More...
 
struct  ThemeSet
 
struct  ThemeChangeMessage
 
class  ThemeBase
 Theme management - Image loading and saving. More...
 
struct  ThemeBase::RegisteredTheme
 
class  Theme
 Based on ThemeBase, Theme manages image and icon resources. More...
 

Typedefs

using teThemeType = Identifier
 A choice of theme such as "Light", "Dark", ... More...
 
using teBmps = int
 

Enumerations

enum class  PreferredSystemAppearance { Light , Dark , HighContrastDark }
 A system theme, that matches selected theme best (only works on macOS with builtin themes). More...
 
enum  teResourceType { resTypeColour , resTypeBitmap , resTypeImage = resTypeBitmap }
 The index of a bitmap resource in Theme Resources. More...
 
enum  teResourceFlags {
  resFlagNone =0x00 , resFlagPaired =0x01 , resFlagCursor =0x02 , resFlagNewLine = 0x04 ,
  resFlagInternal = 0x08 , resFlagSkip = 0x10
}
 

Functions

THEME_API ChoiceSettingGUITheme ()
 

Variables

THEME_API Theme theTheme
 
THEME_API BoolSetting GUIBlendThemes
 

Typedef Documentation

◆ teBmps

using teBmps = int

Definition at line 49 of file Theme.h.

◆ teThemeType

A choice of theme such as "Light", "Dark", ...

Definition at line 30 of file Theme.h.

Enumeration Type Documentation

◆ PreferredSystemAppearance

enum class PreferredSystemAppearance
strong

A system theme, that matches selected theme best (only works on macOS with builtin themes).

Enumerator
Light 
Dark 
HighContrastDark 

Definition at line 33 of file Theme.h.

◆ teResourceFlags

Enumerator
resFlagNone 
resFlagPaired 
resFlagCursor 
resFlagNewLine 
resFlagInternal 
resFlagSkip 

Definition at line 58 of file Theme.h.

59{
60 resFlagNone =0x00,
61 resFlagPaired =0x01,
62 resFlagCursor =0x02,
63 resFlagNewLine = 0x04,
64 resFlagInternal = 0x08, // For image manipulation. Don't save or load.
65 resFlagSkip = 0x10
66};
@ resFlagNewLine
Definition: Theme.h:63
@ resFlagSkip
Definition: Theme.h:65
@ resFlagNone
Definition: Theme.h:60
@ resFlagInternal
Definition: Theme.h:64
@ resFlagPaired
Definition: Theme.h:61
@ resFlagCursor
Definition: Theme.h:62

◆ teResourceType

The index of a bitmap resource in Theme Resources.

Enumerator
resTypeColour 
resTypeBitmap 
resTypeImage 

Definition at line 51 of file Theme.h.

52{
56};
@ resTypeColour
Definition: Theme.h:53
@ resTypeBitmap
Definition: Theme.h:54
@ resTypeImage
Definition: Theme.h:55

Function Documentation

◆ GUITheme()

THEME_API ChoiceSetting & GUITheme ( )

Referenced by ThemeBase::LoadPreferredTheme(), GUIPrefs::PopulateOrExchange(), ThemeBase::ReadImageCache(), and ThemeBase::SwitchTheme().

Here is the caller graph for this function:

Variable Documentation

◆ GUIBlendThemes

THEME_API BoolSetting GUIBlendThemes
extern

◆ theTheme

THEME_API Theme theTheme
extern

Definition at line 82 of file Theme.cpp.

Referenced by AboutDialog::AboutDialog(), EditToolBar::AddButton(), ScrubbingToolBar::AddButton(), TranscriptionToolBar::AddButton(), anonymous_namespace{HelpMenus.cpp}::QuickFixDialog::AddStuck(), SelectionBar::AddTitle(), AdornedRulerPanel::AdornedRulerPanel(), AlphaBlend(), AColor::ApplyUpdatedImages(), ProjectWindow::ApplyUpdatedTheme(), ASlider::ASlider(), auStaticText::auStaticText(), AColor::Bevel2(), AColor::BevelTrackInfo(), AColor::ButtonStretch(), ThemePrefs::Cancel(), TrackInfo::CloseTitleDrawFunction(), GUIPrefs::Commit(), ThemePrefs::Commit(), anonymous_namespace{RealtimeEffectPanel.cpp}::RealtimeEffectControl::Create(), CreateStdButtonSizer(), Exporter::CreateUserPane(), CursorColour(), WaveTrackVRulerControls::DoDraw(), AdornedRulerPanel::DoDrawMarks(), AdornedRulerPanel::DoDrawPlayRegion(), AdornedRulerPanel::DoDrawPlayRegionLimits(), LabelTrackView::Draw(), NoteTrackAffordanceControls::Draw(), WaveTrackAffordanceControls::Draw(), TimeTrackVRulerControls::Draw(), Ruler::Label::Draw(), TrackInfo::DrawCloseButton(), anonymous_namespace{TimeTrackView.cpp}::DrawHorzRulerAndCurve(), TrackInfo::DrawItems(), NoteTrack::DrawLabelControls(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack(), FrequencyPlotDialog::DrawPlot(), TrackArt::DrawSyncLockTiles(), LWSlider::DrawToBitmap(), anonymous_namespace{TrackPanel.cpp}::DrawTrackName(), ErrorReportDialog::ErrorReportDialog(), WaveTrackControls::GainSlider(), LabelTrackView::GetGlyph(), anonymous_namespace{PlayIndicatorOverlay.cpp}::GetIndicatorBitmap(), Grabber::Grabber(), HtmlColourOfIndex(), AColor::Init(), EffectUIHost::Initialize(), 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(), cloud::ShareAudioToolbar::MakeShareAudioButton(), WaveTrackAffordanceControls::MakeTextEditHelper(), ToolsToolBar::MakeTool(), TrackInfo::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(), DeviceToolBar::Populate(), EditToolBar::Populate(), MeterToolBar::Populate(), ScrubbingToolBar::Populate(), SelectionBar::Populate(), ToolsToolBar::Populate(), TranscriptionToolBar::Populate(), AColor::PreComputeGradient(), ProjectWindow::ProjectWindow(), AdornedRulerPanel::ReCreateButtons(), Ruler::Ruler(), 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().