moved WX_USE_THEME macros inside IMPLEMENT_APP
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10946 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -438,13 +438,15 @@ public:
|
||||
#define IMPLEMENT_WXWIN_MAIN
|
||||
#endif
|
||||
|
||||
// Use this macro exactly once, the argument is the name of the wxApp-derived
|
||||
// class which is the class of your application.
|
||||
#define IMPLEMENT_APP(appname) \
|
||||
wxApp *wxCreateApp() { return new appname; } \
|
||||
wxAppInitializer wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \
|
||||
appname& wxGetApp() { return *(appname *)wxTheApp; } \
|
||||
IMPLEMENT_WXWIN_MAIN
|
||||
#ifdef __WXUNIVERSAL__
|
||||
#include "wx/univ/theme.h"
|
||||
|
||||
#define IMPLEMENT_WX_THEME_SUPPORT \
|
||||
WX_USE_THEME(win32); \
|
||||
WX_USE_THEME(gtk);
|
||||
#else
|
||||
#define IMPLEMENT_WX_THEME_SUPPORT
|
||||
#endif
|
||||
|
||||
// Use this macro if you want to define your own main() or WinMain() function
|
||||
// and call wxEntry() from there.
|
||||
@@ -453,6 +455,20 @@ public:
|
||||
wxAppInitializer wxTheAppInitializer((wxAppInitializerFunction) wxCreateApp); \
|
||||
appname& wxGetApp() { return *(appname *)wxTheApp; }
|
||||
|
||||
// Same as IMPLEMENT_APP() normally but doesn't include themes support in
|
||||
// wxUniversal builds
|
||||
#define IMPLEMENT_APP_NO_THEMES(appname) \
|
||||
IMPLEMENT_APP_NO_MAIN(appname) \
|
||||
IMPLEMENT_WXWIN_MAIN
|
||||
|
||||
// Use this macro exactly once, the argument is the name of the wxApp-derived
|
||||
// class which is the class of your application.
|
||||
#define IMPLEMENT_APP(appname) \
|
||||
IMPLEMENT_APP_NO_THEMES(appname) \
|
||||
IMPLEMENT_WX_THEME_SUPPORT
|
||||
|
||||
// this macro can be used multiple times and just allows you to use wxGetApp()
|
||||
// function
|
||||
#define DECLARE_APP(appname) extern appname& wxGetApp();
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user