X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/de6185e212ebc37ff11ff70278e3c4f68419b097..fea909e19e86b8da2d54c530d3a89ee9456c3333:/src/motif/font.cpp diff --git a/src/motif/font.cpp b/src/motif/font.cpp index 2d0c35bc64..6ecf549405 100644 --- a/src/motif/font.cpp +++ b/src/motif/font.cpp @@ -34,12 +34,12 @@ #ifndef WX_PRECOMP #include "wx/string.h" #include "wx/utils.h" // for wxGetDisplay() + #include "wx/settings.h" + #include "wx/gdicmn.h" #endif -#include "wx/gdicmn.h" #include "wx/fontutil.h" // for wxNativeFontInfo #include "wx/tokenzr.h" -#include "wx/settings.h" #include "wx/motif/private.h" IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) @@ -54,7 +54,7 @@ class wxXFont : public wxObject { public: wxXFont(); - ~wxXFont(); + virtual ~wxXFont(); #if !wxMOTIF_NEW_FONT_HANDLING WXFontStructPtr m_fontStruct; // XFontStruct @@ -91,7 +91,7 @@ public: data.m_underlined, data.m_faceName, data.m_encoding); } - ~wxFontRefData(); + virtual ~wxFontRefData(); protected: // common part of all ctors @@ -393,12 +393,14 @@ void wxFont::SetWeight(int weight) M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now } -void wxFont::SetFaceName(const wxString& faceName) +bool wxFont::SetFaceName(const wxString& faceName) { Unshare(); M_FONTDATA->m_faceName = faceName; M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now + + return wxFontBase::SetFaceName(faceName); } void wxFont::SetUnderlined(bool underlined) @@ -673,7 +675,7 @@ void wxGetTextExtent(WXDisplay* display, const wxFont& font, int direction, ascent2, descent2; XCharStruct overall; - int slen = str.Len(); + int slen = str.length(); XTextExtents((XFontStruct*) pFontStruct, (char*) str.c_str(), slen, &direction, &ascent2, &descent2, &overall);