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
 

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

◆ theTheme

THEME_API Theme theTheme
extern

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(), 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(), Grabber::DrawGrabber(), anonymous_namespace{TimeTrackView.cpp}::DrawHorzRulerAndCurve(), CommonTrackInfo::DrawItems(), anonymous_namespace{NoteTrackControls.cpp}::DrawLabelControls(), MeterPanel::DrawMeterBar(), anonymous_namespace{NoteTrackView.cpp}::DrawNoteTrack(), ClipButtonSpecializations< ClipButtonId::Overflow >::DrawOnClip(), ClipButtonSpecializations< ClipButtonId::Pitch >::DrawOnClip(), ClipButtonSpecializations< ClipButtonId::Speed >::DrawOnClip(), FrequencyPlotDialog::DrawPlot(), TrackArt::DrawSyncLockTiles(), LWSlider::DrawToBitmap(), anonymous_namespace{CommonTrackInfo.cpp}::DrawToolButtonBackground(), ErrorReportDialog::ErrorReportDialog(), EVT_COMMAND_RANGE(), LabelTrackView::GetGlyph(), anonymous_namespace{PlayIndicatorOverlay.cpp}::GetIndicatorBitmap(), HighlitClipButtonHandle::Highlight(), HtmlColourOfIndex(), AColor::Init(), AButton::Init(), InitProjectWindow(), NumericTextCtrl::Layout(), ThemeBase::LoadPreferredTheme(), LoginDialog::LoginDialog(), main(), ToolBar::MakeAlternateImages(), TranscriptionToolBar::MakeAlternateImages(), AudioSetupToolBar::MakeAudioSetupButton(), ToolBar::MakeButton(), MixerBoard::MakeButtonBitmap(), anonymous_namespace{ControlToolBar.cpp}::MakeControlToolBarButton(), anonymous_namespace{LoginDialog.cpp}::MakeLabel(), anonymous_namespace{LoginDialog.cpp}::MakeLoginButton(), ToolBar::MakeMacRecoloredImage(), ToolBar::MakeMacRecoloredImageSize(), ToolBar::MakeRecoloredImageSize(), anonymous_namespace{DynamicRangeProcessorEditor.cpp}::MakeRulerPanel(), SelectionBar::MakeSetupButton(), audacity::cloud::ShareAudioToolbar::MakeShareAudioButton(), WaveTrackAffordanceControls::MakeTextEditHelper(), 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(), EffectLegacyCompressorPanel::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(), audacity::cloud::ShareAudioToolbar::Populate(), AudioSetupToolBar::Populate(), ControlToolBar::Populate(), CutCopyPasteToolBar::Populate(), DeviceToolBar::Populate(), EditToolBar::Populate(), MeterToolBar::Populate(), SelectionBar::Populate(), SnappingToolBar::Populate(), SpectralSelectionBar::Populate(), TimeSignatureToolBar::Populate(), ToolsToolBar::Populate(), TranscriptionToolBar::Populate(), DevicePrefs::PopulateOrExchange(), AColor::PreComputeGradient(), ProjectWindow::ProjectWindow(), AdornedRulerPanel::ReCreateButtons(), Ruler::Ruler(), audacity::cloud::audiocom::UserPanel::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(), CommonTrackInfo::SyncLockDrawFunction(), ThemedAButtonWrapper< AButtonBase >::ThemedAButtonWrapper(), ThemedButtonWrapper< ButtonBase >::ThemedButtonWrapper(), ThemedWindowWrapper< WindowBase >::ThemedWindowWrapper(), ToolBarGrabber::ToolBarGrabber(), ToolDock::ToolDock(), audacity::cloud::audiocom::sync::CloudSyncStatusField::StatusWidget::UpdatePrefs(), MixerBoard::UpdatePrefs(), audacity::cloud::audiocom::UserPanel::UpdateUserData(), AColor::UseThemeColour(), NoteTrackControls::VelocitySlider(), WaveTrackControls::VolumeSlider(), and WhatsNewDialog::WhatsNewDialog().