AllThemeResources.h has a .cpp & doesnt include Theme.h...

... (it used to, via MacroMagic)

This splits a cycle of 8 into 6 + 1 + 1
This commit is contained in:
Paul Licameli 2020-05-26 13:31:32 -04:00
parent ae9aca8177
commit fa4d35296e
32 changed files with 49 additions and 8 deletions

View File

@ -31,6 +31,7 @@ It is also a place to document colour usage policy in Audacity
#include <wx/utils.h>
#include "AllThemeResources.h"
#include "Theme.h"
bool AColor::inited = false;
wxBrush AColor::lightBrush[2];

View File

@ -46,6 +46,7 @@ hold information about one contributor to Audacity.
#include "widgets/HelpSystem.h"
#include "AllThemeResources.h"
#include "Theme.h"
// DA: Logo for About box.
#ifdef EXPERIMENTAL_DA

19
src/AllThemeResources.cpp Normal file
View File

@ -0,0 +1,19 @@
/**********************************************************************
Audacity: A Digital Audio Editor
AllThemeResources.cpp
Paul Licameli split from Theme.cpp
**********************************************************************/
// This tiny file exists so that compilation dependency on AllThemeResources.h
// corresponds with the real linkage dependencies: that is, generate
// the definitions corresponding to extern declarations of the header here
// only
// This declares the variables such as
// int BmpRecordButton = -1;
#define THEME_DECLARATIONS
#include "AllThemeResources.h"

View File

@ -44,6 +44,7 @@ from there. Audacity will look for a file called "Pause.png".
// Note: No '#ifndef/#define' pair on this header file.
// we want to include it multiple times in Theme.cpp.
#include "Audacity.h"
#include "Experimental.h"
#include "MacroMagic.h"

View File

@ -67,6 +67,7 @@ list( APPEND SOURCES
AboutDialog.h
AdornedRulerPanel.cpp
AdornedRulerPanel.h
AllThemeResources.cpp
AllThemeResources.h
AttachedVirtualFunction.h
Audacity.h

View File

@ -73,6 +73,7 @@ the mouse around.
#include "Prefs.h"
#include "Project.h"
#include "ProjectWindow.h"
#include "Theme.h"
#include "WaveClip.h"
#include "ViewInfo.h"
#include "AllThemeResources.h"

View File

@ -25,6 +25,7 @@
#include "FileNames.h"
#include "Internat.h"
#include "AllThemeResources.h"
#include "Theme.h"
wxString HtmlColourOfIndex( int i ){

View File

@ -28,6 +28,7 @@ channel. This collection of functions fills that gap.
#include <wx/image.h>
#include "AllThemeResources.h"
#include "Theme.h"
/// This looks at the first pixel in the image, and shifts
/// the entire image by the vector difference between that

View File

@ -41,7 +41,7 @@ std::unique_ptr<wxImage> OverlayImage(wxImage * background, wxImage * foreground
// JKC: will probably change name from 'teBmps' to 'tIndexBmp';
typedef int teBmps; /// The index of a bitmap resource in Theme Resources.
using teBmps = int; /// The index of a bitmap resource in Theme Resources.
// Same idea, but this time the mask is an alpha channel in
// the foreground bitmap, and it's all retrieved from Themes.

View File

@ -28,7 +28,7 @@ THEME_INITS or THEME_DECLARATIONS or neither of these.
*//*******************************************************************/
#include "Theme.h"
using teBmps = int; /// The index of a bitmap resource in Theme Resources.
// undefine the macros.
#undef DEFINE_IMAGE

View File

@ -43,6 +43,7 @@
#include "ProjectSettings.h"
#include "ProjectWindow.h"
#include "SelectUtilities.h"
#include "Theme.h"
#include "TrackPanel.h" // for EVT_TRACK_PANEL_TIMER
#include "TrackUtilities.h"
#include "UndoManager.h"

View File

@ -42,6 +42,7 @@
#include "tracks/ui/TrackControls.h"
#include "AllThemeResources.h"
#include "Theme.h"
#ifdef SONIFY
#include "../lib-src/portmidi/pm_common/portmidi.h"

View File

@ -100,6 +100,7 @@ for registering for changes.
#include "Prefs.h"
#include "ShuttlePrefs.h"
#include "Theme.h"
#include <wx/setup.h> // for wxUSE_* macros
#include <wx/wx.h>

View File

@ -183,11 +183,6 @@ can't be.
#endif
// This declares the variables such as
// int BmpRecordButton = -1;
#define THEME_DECLARATIONS
#include "AllThemeResources.h"
// Include the ImageCache...
static const unsigned char DarkImageCacheAsData[] = {

View File

@ -28,7 +28,7 @@ class wxImage;
class wxPen;
// JKC: will probably change name from 'teBmps' to 'tIndexBmp';
typedef int teBmps; /// The index of a bitmap resource in Theme Resources.
using teBmps = int; /// The index of a bitmap resource in Theme Resources.
enum teResourceType
{

View File

@ -46,6 +46,7 @@ audio tracks.
#include "AColor.h"
#include "AllThemeResources.h"
#include "prefs/GUIPrefs.h"
#include "Theme.h"
#include "Track.h"
#include "TrackPanelDrawingContext.h"
#include "ViewInfo.h"

View File

@ -37,6 +37,7 @@ Paul Licameli split from TrackPanel.cpp
#include "AllThemeResources.h"
#include "Prefs.h"
#include "Project.h"
#include "Theme.h"
#include "Track.h"
#include "TrackPanelDrawingContext.h"
#include "ViewInfo.h"

View File

@ -59,6 +59,7 @@ is time to refresh some aspect of the screen.
#include "ProjectSettings.h"
#include "ProjectStatus.h"
#include "ProjectWindow.h"
#include "Theme.h"
#include "TrackPanelMouseEvent.h"
#include "TrackPanelResizeHandle.h"
//#define DEBUG_DRAW_TIMING 1

View File

@ -32,6 +32,7 @@
#include "../Prefs.h"
#include "../Shuttle.h"
#include "../ShuttleGui.h"
#include "../Theme.h"
#include "../widgets/valnum.h"
#include "../WaveTrack.h"

View File

@ -42,6 +42,7 @@
#include "../Prefs.h"
#include "../Shuttle.h"
#include "../ShuttleGui.h"
#include "../Theme.h"
#include "../float_cast.h"
#include "../widgets/Ruler.h"

View File

@ -99,6 +99,7 @@
#include "../FFT.h"
#include "../Prefs.h"
#include "../Project.h"
#include "../Theme.h"
#include "../TrackArtist.h"
#include "../WaveClip.h"
#include "../ViewInfo.h"

View File

@ -59,6 +59,7 @@ a graph for EffectScienFilter.
#include "../Project.h"
#include "../Shuttle.h"
#include "../ShuttleGui.h"
#include "../Theme.h"
#include "../WaveTrack.h"
#include "../widgets/valnum.h"
#include "../widgets/AudacityMessageBox.h"

View File

@ -20,6 +20,7 @@ Paul Licameli split from TrackPanel.cpp
#include "../../../../AColor.h"
#include "../../../../AllThemeResources.h"
#include "../../../../HitTestResult.h"
#include "../../../../Theme.h"
#include "../../../../TrackArtist.h"
#include "../../../../TrackPanelDrawingContext.h"
#include "../../../../TrackPanelMouseEvent.h"

View File

@ -19,6 +19,7 @@ Paul Licameli split from TrackPanel.cpp
#include "../../../../AColor.h"
#include "../../../../AllThemeResources.h"
#include "../../../../Theme.h"
#include "../../../../TrackArtist.h"
#include "../../../../TrackPanelDrawingContext.h"
#include "../../../../widgets/Ruler.h"

View File

@ -15,6 +15,7 @@ Paul Licameli split from TrackPanel.cpp
#include "../../../AColor.h"
#include "../../../AllThemeResources.h"
#include "../../../Theme.h"
#include "../../../TimeTrack.h"
#include "../../../TrackArtist.h"
#include "../../../TrackPanelDrawingContext.h"

View File

@ -21,6 +21,7 @@ Paul Licameli split from TrackPanel.cpp
#include "../../../Envelope.h"
#include "../../../EnvelopeEditor.h"
#include "../../../HitTestResult.h"
#include "../../../Theme.h"
#include "../../../TrackArtist.h"
#include "../../../TrackPanelDrawingContext.h"
#include "../../../TrackPanelMouseEvent.h"

View File

@ -64,6 +64,7 @@ or ASlider.
#include "../ProjectStatus.h"
#include "../ProjectWindowBase.h"
#include "../ShuttleGui.h"
#include "../Theme.h"
#include "../AllThemeResources.h"

View File

@ -32,6 +32,7 @@ around to NEW positions.
#include "../AColor.h"
#include "../AllThemeResources.h"
#include "../Internat.h"
#include "../Theme.h"
////////////////////////////////////////////////////////////
/// Methods for Grabber

View File

@ -43,6 +43,7 @@
#include "../FileNames.h"
#include "../AllThemeResources.h"
#include "../ShuttleGui.h"
#include "../Theme.h"
#include "../HelpText.h"
#include "../Prefs.h"
#include "../wxFileNameWrapper.h"

View File

@ -72,6 +72,7 @@
#include "../ProjectStatus.h"
#include "../Prefs.h"
#include "../ShuttleGui.h"
#include "../Theme.h"
#include "../AllThemeResources.h"
#include "../widgets/valnum.h"

View File

@ -172,6 +172,7 @@ different formats.
#include "../AllThemeResources.h"
#include "../AColor.h"
#include "../KeyboardCapture.h"
#include "../Theme.h"
#include <algorithm>
#include <math.h>

View File

@ -66,6 +66,7 @@ array of Ruler::Label.
#include "../AllThemeResources.h"
#include "../Envelope.h"
#include "../NumberScale.h"
#include "../Theme.h"
#include "../ViewInfo.h"
using std::min;