]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/univ/theme.h
fix gpf in mdi sample with motif when child is closed
[wxWidgets.git] / include / wx / univ / theme.h
index 94ba4fcfab6630bd875b8d52cd4c3dad0b1ee998..3197404bd4d8062a91d502f2e9daf9c10e8f86f7 100644 (file)
@@ -7,14 +7,14 @@
 // Modified by:
 // Created:     06.08.00
 // RCS-ID:      $Id$
 // Modified by:
 // Created:     06.08.00
 // RCS-ID:      $Id$
-// Copyright:   (c) 2000 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
-// Licence:     wxWindows license
+// Copyright:   (c) 2000 SciTech Software, Inc. (www.scitechsoft.com)
+// Licence:     wxWindows licence
 ///////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_UNIV_THEME_H_
 #define _WX_UNIV_THEME_H_
 
 ///////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_UNIV_THEME_H_
 #define _WX_UNIV_THEME_H_
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma interface "theme.h"
 #endif
 
     #pragma interface "theme.h"
 #endif
 
@@ -25,6 +25,7 @@
 class WXDLLEXPORT wxRenderer;
 class WXDLLEXPORT wxColourScheme;
 class WXDLLEXPORT wxInputHandler;
 class WXDLLEXPORT wxRenderer;
 class WXDLLEXPORT wxColourScheme;
 class WXDLLEXPORT wxInputHandler;
+class WXDLLEXPORT wxArtProvider;
 struct WXDLLEXPORT wxThemeInfo;
 
 class WXDLLEXPORT wxTheme
 struct WXDLLEXPORT wxThemeInfo;
 
 class WXDLLEXPORT wxTheme
@@ -52,6 +53,9 @@ public:
     // this theme
     virtual wxRenderer *GetRenderer() = 0;
 
     // this theme
     virtual wxRenderer *GetRenderer() = 0;
 
+    // get the art provider to be used together with this theme
+    virtual wxArtProvider *GetArtProvider() = 0;
+
     // get the input handler of the given type
     virtual wxInputHandler *GetInputHandler(const wxString& handlerType) = 0;
 
     // get the input handler of the given type
     virtual wxInputHandler *GetInputHandler(const wxString& handlerType) = 0;
 
@@ -69,8 +73,7 @@ private:
 
     // the current theme
     static wxTheme *ms_theme;
 
     // the current theme
     static wxTheme *ms_theme;
-
-    friend wxThemeInfo;
+    friend struct WXDLLEXPORT wxThemeInfo;
 };
 
 // ----------------------------------------------------------------------------
 };
 
 // ----------------------------------------------------------------------------
@@ -102,10 +105,10 @@ struct WXDLLEXPORT wxThemeInfo
 // without it, an over optimizing linker may discard the object module
 // containing the theme implementation entirely
 #define WX_USE_THEME(themename)                                             \
 // without it, an over optimizing linker may discard the object module
 // containing the theme implementation entirely
 #define WX_USE_THEME(themename)                                             \
-    extern bool wxThemeUse##themename;                                      \
+    extern WXDLLEXPORT_DATA(bool) wxThemeUse##themename;                    \
     static struct wxThemeUserFor##themename                                 \
     {                                                                       \
     static struct wxThemeUserFor##themename                                 \
     {                                                                       \
-        wxThemeUserFor##themename() { wxThemeUse##themename = TRUE; }       \
+        wxThemeUserFor##themename() { wxThemeUse##themename = true; }       \
     } wxThemeDoUse##themename
 
 // to declare a new theme, this macro must be used in the class declaration
     } wxThemeDoUse##themename
 
 // to declare a new theme, this macro must be used in the class declaration
@@ -118,10 +121,10 @@ struct WXDLLEXPORT wxThemeInfo
 
 // and this one must be inserted in the source file
 #define WX_IMPLEMENT_THEME(classname, themename, themedesc)                 \
 
 // and this one must be inserted in the source file
 #define WX_IMPLEMENT_THEME(classname, themename, themedesc)                 \
-    bool wxThemeUse##themename = TRUE;                                      \
+    WXDLLEXPORT_DATA(bool) wxThemeUse##themename = true;                    \
     wxTheme *wxCtorFor##themename() { return new classname; }               \
     wxThemeInfo classname::ms_info##themename(wxCtorFor##themename,         \
     wxTheme *wxCtorFor##themename() { return new classname; }               \
     wxThemeInfo classname::ms_info##themename(wxCtorFor##themename,         \
-                                              #themename, themedesc)
+                                              wxT( #themename ), themedesc)
 
 #endif // _WX_UNIV_THEME_H_
 
 
 #endif // _WX_UNIV_THEME_H_