X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/563f868d3850d70d4b08afd6fa507daafb29c656..9c34dd9deafaa428534b498b90799687a7dcddaa:/src/motif/font.cpp diff --git a/src/motif/font.cpp b/src/motif/font.cpp index d5b995aa3b..e63de3bf42 100644 --- a/src/motif/font.cpp +++ b/src/motif/font.cpp @@ -21,6 +21,8 @@ #pragma implementation "font.h" #endif +#include "wx/defs.h" + #ifdef __VMS #pragma message disable nosimpint #include "wx/vms_x_fix.h" @@ -30,7 +32,6 @@ #pragma message enable nosimpint #endif -#include "wx/defs.h" #include "wx/string.h" #include "wx/font.h" #include "wx/gdicmn.h" @@ -194,7 +195,7 @@ wxFont::wxFont(const wxNativeFontInfo& info) { Init(); - (void)Create(info.xFontName); + (void)Create(info.GetXFontName()); } void wxFont::Init() @@ -222,13 +223,13 @@ bool wxFont::Create(const wxString& fontname, wxFontEncoding enc) { if( !fontname ) { - *this = wxSystemSettings::GetSystemFont( wxSYS_DEFAULT_GUI_FONT); + *this = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT); return TRUE; } m_refData = new wxFontRefData(); - M_FONTDATA->m_nativeFontInfo.xFontName = fontname; // X font name + M_FONTDATA->m_nativeFontInfo.SetXFontName(fontname); // X font name wxString tmp; @@ -349,7 +350,7 @@ void wxFont::SetPointSize(int pointSize) Unshare(); M_FONTDATA->m_pointSize = pointSize; - M_FONTDATA->m_nativeFontInfo.xFontName.Clear(); // invalid now + M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now RealizeResource(); } @@ -359,7 +360,7 @@ void wxFont::SetFamily(int family) Unshare(); M_FONTDATA->m_family = family; - M_FONTDATA->m_nativeFontInfo.xFontName.Clear(); // invalid now + M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now RealizeResource(); } @@ -369,7 +370,7 @@ void wxFont::SetStyle(int style) Unshare(); M_FONTDATA->m_style = style; - M_FONTDATA->m_nativeFontInfo.xFontName.Clear(); // invalid now + M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now RealizeResource(); } @@ -379,7 +380,7 @@ void wxFont::SetWeight(int weight) Unshare(); M_FONTDATA->m_weight = weight; - M_FONTDATA->m_nativeFontInfo.xFontName.Clear(); // invalid now + M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now RealizeResource(); } @@ -389,7 +390,7 @@ void wxFont::SetFaceName(const wxString& faceName) Unshare(); M_FONTDATA->m_faceName = faceName; - M_FONTDATA->m_nativeFontInfo.xFontName.Clear(); // invalid now + M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now RealizeResource(); } @@ -408,7 +409,7 @@ void wxFont::SetEncoding(wxFontEncoding encoding) Unshare(); M_FONTDATA->m_encoding = encoding; - M_FONTDATA->m_nativeFontInfo.xFontName.Clear(); // invalid now + M_FONTDATA->m_nativeFontInfo.GetXFontName().Clear(); // invalid now RealizeResource(); } @@ -477,7 +478,7 @@ wxNativeFontInfo *wxFont::GetNativeFontInfo() const { wxCHECK_MSG( Ok(), (wxNativeFontInfo *)NULL, wxT("invalid font") ); - if(M_FONTDATA->m_nativeFontInfo.xFontName.IsEmpty()) + if(M_FONTDATA->m_nativeFontInfo.GetXFontName().IsEmpty()) GetInternalFont(); return new wxNativeFontInfo(M_FONTDATA->m_nativeFontInfo);