#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)
{
public:
wxXFont();
- ~wxXFont();
+ virtual ~wxXFont();
#if !wxMOTIF_NEW_FONT_HANDLING
WXFontStructPtr m_fontStruct; // XFontStruct
data.m_underlined, data.m_faceName, data.m_encoding);
}
- ~wxFontRefData();
+ virtual ~wxFontRefData();
protected:
// common part of all ctors
m_fonts.Clear();
}
+#define M_FONTDATA ((wxFontRefData*)m_refData)
+
// ----------------------------------------------------------------------------
// wxFont
// ----------------------------------------------------------------------------
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)
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);