X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2d2d4fc70965a477ee8aba3d1afd8138bab5c2e2..b9505233a5e5ee77c15e0d1dd2f8f6422af1e74c:/include/wx/apptrait.h diff --git a/include/wx/apptrait.h b/include/wx/apptrait.h index 6fa87d9e25..0a169af8f0 100644 --- a/include/wx/apptrait.h +++ b/include/wx/apptrait.h @@ -19,6 +19,7 @@ class WXDLLEXPORT wxAppTraits; #endif // wxUSE_FONTMAP class WXDLLEXPORT wxLog; class WXDLLEXPORT wxMessageOutput; +class WXDLLEXPORT wxRendererNative; class WXDLLEXPORT wxString; // ---------------------------------------------------------------------------- @@ -44,6 +45,13 @@ public: virtual wxFontMapper *CreateFontMapper() = 0; #endif // wxUSE_FONTMAP + // get the renderer to use for drawing the generic controls (return value + // may be NULL in which case the default renderer for the current platform + // is used); this is used in GUI only and always returns NULL in console + // + // NB: returned pointer will be deleted by the caller + virtual wxRendererNative *CreateRenderer() = 0; + // functions abstracting differences between GUI and console modes // ------------------------------------------------------------------------ @@ -90,12 +98,14 @@ public: // include the platform-specific version of the class // ---------------------------------------------------------------------------- +// NB: test for __UNIX__ before __WXMAC__ as under Darwin we want to use the +// Unix code (and otherwise __UNIX__ wouldn't be defined) #if defined(__WXMSW__) #include "wx/msw/apptbase.h" -#elif defined(__WXMAC__) - #include "wx/mac/apptbase.h" #elif defined(__UNIX__) #include "wx/unix/apptbase.h" +#elif defined(__WXMAC__) + #include "wx/mac/apptbase.h" #else // no platform-specific methods to add to wxAppTraits // wxAppTraits must be a class because it was forward declared as class class WXDLLIMPEXP_BASE wxAppTraits : public wxAppTraitsBase @@ -121,6 +131,7 @@ public: #if wxUSE_FONTMAP virtual wxFontMapper *CreateFontMapper(); #endif // wxUSE_FONTMAP + virtual wxRendererNative *CreateRenderer(); #ifdef __WXDEBUG__ virtual bool ShowAssertDialog(const wxString& msg); @@ -147,6 +158,7 @@ public: #if wxUSE_FONTMAP virtual wxFontMapper *CreateFontMapper(); #endif // wxUSE_FONTMAP + virtual wxRendererNative *CreateRenderer(); #ifdef __WXDEBUG__ virtual bool ShowAssertDialog(const wxString& msg); @@ -165,10 +177,10 @@ public: #if defined(__WXMSW__) #include "wx/msw/apptrait.h" -#elif defined(__WXMAC__) - #include "wx/mac/apptrait.h" #elif defined(__UNIX__) #include "wx/unix/apptrait.h" +#elif defined(__WXMAC__) + #include "wx/mac/apptrait.h" #else // no platform-specific methods to add to wxAppTraits #if wxUSE_GUI typedef wxGUIAppTraitsBase wxGUIAppTraits;