From: Václav Slavík Date: Mon, 20 Nov 2006 16:14:01 +0000 (+0000) Subject: don't expose M_FONTDATA in public header X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/873fd4af5f9ed1f078636af1ae9ea21bbed06b5a don't expose M_FONTDATA in public header git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43544 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/font.h b/include/wx/font.h index 5d890e6176..4011aea371 100644 --- a/include/wx/font.h +++ b/include/wx/font.h @@ -24,7 +24,6 @@ // forward declarations // ---------------------------------------------------------------------------- -class WXDLLEXPORT wxFontData; class WXDLLEXPORT wxFontBase; class WXDLLEXPORT wxFont; class WXDLLEXPORT wxSize; @@ -212,10 +211,6 @@ public: static void SetDefaultEncoding(wxFontEncoding encoding); protected: - // get the internal data - wxFontRefData *GetFontData() const - { return (wxFontRefData *)m_refData; } - // the function called by both overloads of SetNativeFontInfo() virtual void DoSetNativeFontInfo(const wxNativeFontInfo& info); @@ -252,11 +247,5 @@ private: #include "wx/os2/font.h" #endif -// ---------------------------------------------------------------------------- -// macros -// ---------------------------------------------------------------------------- - -#define M_FONTDATA GetFontData() - #endif // _WX_FONT_H_BASE_ diff --git a/src/cocoa/font.cpp b/src/cocoa/font.cpp index 61c71aaac0..7b2bbfecea 100644 --- a/src/cocoa/font.cpp +++ b/src/cocoa/font.cpp @@ -37,6 +37,8 @@ wxFontRefData::~wxFontRefData() // TODO: delete font data } +#define M_FONTDATA (wxFontRefData*)m_refData) + bool wxFont::Create(const wxNativeFontInfo&) { return false; diff --git a/src/dfb/font.cpp b/src/dfb/font.cpp index e17ff385fd..f33dd66e8f 100644 --- a/src/dfb/font.cpp +++ b/src/dfb/font.cpp @@ -105,6 +105,8 @@ public: wxIDirectFBFontPtr m_font; }; +#define M_FONTDATA (wxFontRefData*)m_refData) + // ---------------------------------------------------------------------------- // wxFont diff --git a/src/gtk/font.cpp b/src/gtk/font.cpp index b3983ccb8a..31338b9b5a 100644 --- a/src/gtk/font.cpp +++ b/src/gtk/font.cpp @@ -127,6 +127,8 @@ private: friend class wxFont; }; +#define M_FONTDATA (wxFontRefData*)m_refData) + // ---------------------------------------------------------------------------- // wxFontRefData // ---------------------------------------------------------------------------- diff --git a/src/gtk1/font.cpp b/src/gtk1/font.cpp index 03e3fd5521..70260cca96 100644 --- a/src/gtk1/font.cpp +++ b/src/gtk1/font.cpp @@ -153,6 +153,8 @@ private: friend class wxFont; }; +#define M_FONTDATA (wxFontRefData*)m_refData) + // ---------------------------------------------------------------------------- // wxFontRefData // ---------------------------------------------------------------------------- diff --git a/src/mac/carbon/font.cpp b/src/mac/carbon/font.cpp index 0650fe78d9..c95a5e8bdf 100644 --- a/src/mac/carbon/font.cpp +++ b/src/mac/carbon/font.cpp @@ -154,6 +154,8 @@ public: wxNativeFontInfo m_info; }; +#define M_FONTDATA (wxFontRefData*)m_refData) + // ============================================================================ // implementation diff --git a/src/mac/classic/font.cpp b/src/mac/classic/font.cpp index e2757af968..99b3e542f3 100644 --- a/src/mac/classic/font.cpp +++ b/src/mac/classic/font.cpp @@ -132,6 +132,9 @@ public: public: void MacFindFont() ; }; + +#define M_FONTDATA (wxFontRefData*)m_refData) + // ============================================================================ // implementation // ============================================================================ diff --git a/src/mgl/font.cpp b/src/mgl/font.cpp index 1b9410516b..d2e32d989b 100644 --- a/src/mgl/font.cpp +++ b/src/mgl/font.cpp @@ -79,6 +79,8 @@ private: friend class wxFont; }; +#define M_FONTDATA (wxFontRefData*)m_refData) + // ============================================================================ // implementation // ============================================================================ diff --git a/src/motif/font.cpp b/src/motif/font.cpp index 6ecf549405..ba8aaedabb 100644 --- a/src/motif/font.cpp +++ b/src/motif/font.cpp @@ -211,6 +211,8 @@ wxFontRefData::~wxFontRefData() m_fonts.Clear(); } +#define M_FONTDATA (wxFontRefData*)m_refData) + // ---------------------------------------------------------------------------- // wxFont // ---------------------------------------------------------------------------- diff --git a/src/msw/font.cpp b/src/msw/font.cpp index bac473af42..de28e3919e 100644 --- a/src/msw/font.cpp +++ b/src/msw/font.cpp @@ -321,6 +321,8 @@ protected: bool m_nativeFontInfoOk; }; +#define M_FONTDATA (wxFontRefData*)m_refData) + // ============================================================================ // implementation // ============================================================================ diff --git a/src/os2/font.cpp b/src/os2/font.cpp index 0742d23070..61db533606 100644 --- a/src/os2/font.cpp +++ b/src/os2/font.cpp @@ -297,6 +297,8 @@ protected: bool m_bInternalPS; // Internally generated PS? }; // end of CLASS wxFontRefData +#define M_FONTDATA (wxFontRefData*)m_refData) + // ============================================================================ // implementation // ============================================================================ diff --git a/src/x11/font.cpp b/src/x11/font.cpp index 0c8dc0307d..9567408aae 100644 --- a/src/x11/font.cpp +++ b/src/x11/font.cpp @@ -164,6 +164,8 @@ protected: #endif }; +#define M_FONTDATA (wxFontRefData*)m_refData) + // ---------------------------------------------------------------------------- // wxFontRefData // ----------------------------------------------------------------------------