X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/873fd4af5f9ed1f078636af1ae9ea21bbed06b5a..6a8cbe1b9202ee5eb7a8bfa9b2ce66afeadfad6a:/src/gtk1/font.cpp diff --git a/src/gtk1/font.cpp b/src/gtk1/font.cpp index 70260cca96..097519952e 100644 --- a/src/gtk1/font.cpp +++ b/src/gtk1/font.cpp @@ -54,7 +54,7 @@ WX_DECLARE_HASH_MAP(int, GdkFont *, wxIntegerHash, wxIntegerEqual, // wxFontRefData // ---------------------------------------------------------------------------- -class wxFontRefData : public wxObjectRefData +class wxFontRefData : public wxGDIRefData { public: // from broken down font parameters, also default ctor @@ -153,7 +153,7 @@ private: friend class wxFont; }; -#define M_FONTDATA (wxFontRefData*)m_refData) +#define M_FONTDATA ((wxFontRefData*)m_refData) // ---------------------------------------------------------------------------- // wxFontRefData @@ -215,8 +215,8 @@ void wxFontRefData::InitFromNative() } } - switch ( wxToupper(*m_nativeFontInfo. - GetXFontComponent(wxXLFD_SLANT).c_str()) ) + switch ( wxToupper(m_nativeFontInfo. + GetXFontComponent(wxXLFD_SLANT)[0u]).GetValue() ) { case _T('I'): // italique m_style = wxFONTSTYLE_ITALIC; @@ -291,7 +291,7 @@ void wxFontRefData::InitFromNative() } wxFontRefData::wxFontRefData( const wxFontRefData& data ) - : wxObjectRefData() + : wxGDIRefData() { m_pointSize = data.m_pointSize; m_family = data.m_family; @@ -536,6 +536,16 @@ wxFont::~wxFont() { } +wxGDIRefData *wxFont::CreateGDIRefData() const +{ + return new wxFontRefData; +} + +wxGDIRefData *wxFont::CloneGDIRefData(const wxGDIRefData *data) const +{ + return new wxFontRefData(*wx_static_cast(const wxFontRefData *, data)); +} + // ---------------------------------------------------------------------------- // accessors // ----------------------------------------------------------------------------