X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0b83552acf359689c43d641175f7292391f6a9e6..eea4d01c65f9b29baa1193db762b4c6b8144af24:/src/gtk1/font.cpp?ds=sidebyside diff --git a/src/gtk1/font.cpp b/src/gtk1/font.cpp index 9970976eff..735585d3d3 100644 --- a/src/gtk1/font.cpp +++ b/src/gtk1/font.cpp @@ -23,8 +23,8 @@ #ifndef WX_PRECOMP #include "wx/log.h" #include "wx/settings.h" - #include "wx/cmndata.h" #include "wx/gdicmn.h" + #include "wx/encinfo.h" #endif #include "wx/fontutil.h" @@ -450,8 +450,6 @@ void wxFontRefData::SetNativeFontInfo(const wxNativeFontInfo& info) // wxFont creation // ---------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) - wxFont::wxFont(const wxNativeFontInfo& info) { (void) Create(info.GetXFontName()); @@ -522,49 +520,47 @@ wxGDIRefData *wxFont::CloneGDIRefData(const wxGDIRefData *data) const int wxFont::GetPointSize() const { - wxCHECK_MSG( Ok(), 0, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), 0, wxT("invalid font") ); return M_FONTDATA->m_pointSize; } wxString wxFont::GetFaceName() const { - wxCHECK_MSG( Ok(), wxEmptyString, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), wxEmptyString, wxT("invalid font") ); return M_FONTDATA->m_faceName; } -wxFontFamily wxFont::GetFamily() const +wxFontFamily wxFont::DoGetFamily() const { - wxCHECK_MSG( Ok(), wxFONTFAMILY_MAX, wxT("invalid font") ); - return M_FONTDATA->m_family; } wxFontStyle wxFont::GetStyle() const { - wxCHECK_MSG( Ok(), wxFONTSTYLE_MAX, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), wxFONTSTYLE_MAX, wxT("invalid font") ); return M_FONTDATA->m_style; } wxFontWeight wxFont::GetWeight() const { - wxCHECK_MSG( Ok(), wxFONTWEIGHT_MAX, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), wxFONTWEIGHT_MAX, wxT("invalid font") ); return M_FONTDATA->m_weight; } bool wxFont::GetUnderlined() const { - wxCHECK_MSG( Ok(), false, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), false, wxT("invalid font") ); return M_FONTDATA->m_underlined; } wxFontEncoding wxFont::GetEncoding() const { - wxCHECK_MSG( Ok(), wxFONTENCODING_DEFAULT, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), wxFONTENCODING_DEFAULT, wxT("invalid font") ); // m_encoding is unused in wxGTK2, return encoding that the user set. return M_FONTDATA->m_encoding; @@ -572,7 +568,7 @@ wxFontEncoding wxFont::GetEncoding() const const wxNativeFontInfo *wxFont::GetNativeFontInfo() const { - wxCHECK_MSG( Ok(), NULL, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), NULL, wxT("invalid font") ); if ( !M_FONTDATA->HasNativeFont() ) { @@ -587,7 +583,7 @@ const wxNativeFontInfo *wxFont::GetNativeFontInfo() const bool wxFont::IsFixedWidth() const { - wxCHECK_MSG( Ok(), false, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), false, wxT("invalid font") ); if ( M_FONTDATA->HasNativeFont() ) { @@ -700,7 +696,7 @@ GdkFont *wxFont::GetInternalFont( float scale ) const { GdkFont *font = NULL; - wxCHECK_MSG( Ok(), font, wxT("invalid font") ); + wxCHECK_MSG( IsOk(), font, wxT("invalid font") ); long int_scale = long(scale * 100.0 + 0.5); // key for fontlist int point_scale = (int)((M_FONTDATA->m_pointSize * 10 * int_scale) / 100);