X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c5d3e1ccd1d27ab0cf913ddbffb1b54b5802f3a..f5ba273ecd799f652736ce2bc830283787302a56:/src/common/fontcmn.cpp?ds=sidebyside diff --git a/src/common/fontcmn.cpp b/src/common/fontcmn.cpp index 57a8cf3cc7..8a5e31d4dd 100644 --- a/src/common/fontcmn.cpp +++ b/src/common/fontcmn.cpp @@ -17,6 +17,10 @@ // headers // ---------------------------------------------------------------------------- +#ifdef __GNUG__ + #pragma implementation "fontbase.h" +#endif + // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -38,6 +42,7 @@ wxFontEncoding wxFontBase::ms_encodingDefault = wxFONTENCODING_SYSTEM; +/* static */ wxFont *wxFontBase::New(int size, int family, int style, @@ -60,53 +65,53 @@ wxFont& wxFont::operator=(const wxFont& font) // VZ: is it correct to compare pointers and not the contents? (FIXME) bool wxFontBase::operator==(const wxFont& font) const { - return m_refData == font.m_refData; + return GetFontData() == font.GetFontData(); } bool wxFontBase::operator!=(const wxFont& font) const { - return m_refData != font.m_refData; + return GetFontData() != font.GetFontData(); } wxString wxFontBase::GetFamilyString() const { - wxCHECK_MSG( Ok(), _T("wxDEFAULT"), _T("invalid font") ); + wxCHECK_MSG( Ok(), wxT("wxDEFAULT"), wxT("invalid font") ); switch ( GetFamily() ) { - case wxDECORATIVE: return _T("wxDECORATIVE"); - case wxROMAN: return _T("wxROMAN"); - case wxSCRIPT: return _T("wxSCRIPT"); - case wxSWISS: return _T("wxSWISS"); - case wxMODERN: return _T("wxMODERN"); - case wxTELETYPE: return _T("wxTELETYPE"); - default: return _T("wxDEFAULT"); + case wxDECORATIVE: return wxT("wxDECORATIVE"); + case wxROMAN: return wxT("wxROMAN"); + case wxSCRIPT: return wxT("wxSCRIPT"); + case wxSWISS: return wxT("wxSWISS"); + case wxMODERN: return wxT("wxMODERN"); + case wxTELETYPE: return wxT("wxTELETYPE"); + default: return wxT("wxDEFAULT"); } } wxString wxFontBase::GetStyleString() const { - wxCHECK_MSG( Ok(), _T("wxDEFAULT"), _T("invalid font") ); + wxCHECK_MSG( Ok(), wxT("wxDEFAULT"), wxT("invalid font") ); switch ( GetStyle() ) { - case wxNORMAL: return _T("wxNORMAL"); - case wxSLANT: return _T("wxSLANT"); - case wxITALIC: return _T("wxITALIC"); - default: return _T("wxDEFAULT"); + case wxNORMAL: return wxT("wxNORMAL"); + case wxSLANT: return wxT("wxSLANT"); + case wxITALIC: return wxT("wxITALIC"); + default: return wxT("wxDEFAULT"); } } wxString wxFontBase::GetWeightString() const { - wxCHECK_MSG( Ok(), _T("wxDEFAULT"), _T("invalid font") ); + wxCHECK_MSG( Ok(), wxT("wxDEFAULT"), wxT("invalid font") ); switch ( GetWeight() ) { - case wxNORMAL: return _T("wxNORMAL"); - case wxBOLD: return _T("wxBOLD"); - case wxLIGHT: return _T("wxLIGHT"); - default: return _T("wxDEFAULT"); + case wxNORMAL: return wxT("wxNORMAL"); + case wxBOLD: return wxT("wxBOLD"); + case wxLIGHT: return wxT("wxLIGHT"); + default: return wxT("wxDEFAULT"); } }