Audacity 3.2.0
MacroMagic.h
Go to the documentation of this file.
1/**********************************************************************
2
3 Audacity: A Digital Audio Editor
4
5 MacroMagic.h
6
7 James Crook
8
9 Audacity is free software.
10 This file is licensed under the wxWidgets license, see License.txt
11
12********************************************************************//*******************************************************************/
30
31using teBmps = int;
32
33// undefine the macros.
34#undef DEFINE_IMAGE
35#undef DEFINE_COLOUR
36#undef SET_THEME_FLAGS
37
38
39#define THEME_EXTERNS
40
41#ifdef THEME_INITS
42#define DEFINE_IMAGE( name, initialiser, textual_name ) \
43 theTheme.RegisterImage( allNames, myFlags, name, initialiser, textual_name );
44#define DEFINE_COLOUR( name, initialiser, textual_name )\
45 theTheme.RegisterColour( allNames, name, initialiser, textual_name );
46#define SET_THEME_FLAGS( flags ) ( myFlags = flags );
47#undef THEME_DECLARATIONS
48#undef THEME_EXTERNS
49#endif
50
51#ifdef THEME_DECLARATIONS
52#define DEFINE_IMAGE( name, initialiser, textual_name ) THEME_API teBmps name=-1;
53#define DEFINE_COLOUR( name, initialiser, textual_name ) THEME_API int name=-1;
54#define SET_THEME_FLAGS( flags )
55#undef THEME_INITS
56#undef THEME_EXTERNS
57#endif
58
59#ifdef THEME_EXTERNS
60#define DEFINE_IMAGE( name, initialiser, textual_name ) extern THEME_API teBmps name;
61#define DEFINE_COLOUR( name, initialiser, textual_name ) extern THEME_API int name;
62#define SET_THEME_FLAGS( flags )
63#endif
int teBmps