X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/09a1dffa32ae09ea47789eb071a1fdac0d154dda..e0c5c96f67eaf13ccbd378616bdf98c8dba01e78:/src/x11/font.cpp?ds=sidebyside diff --git a/src/x11/font.cpp b/src/x11/font.cpp index 16aeceff70..4eaee81f00 100644 --- a/src/x11/font.cpp +++ b/src/x11/font.cpp @@ -17,7 +17,7 @@ // headers // ---------------------------------------------------------------------------- -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "font.h" #endif @@ -424,7 +424,7 @@ void wxFontRefData::ClearX11Fonts() { #if wxUSE_UNICODE #else - wxNode* node = m_fonts.GetFirst(); + wxList::compatibility_iterator node = m_fonts.GetFirst(); while (node) { wxXFont* f = (wxXFont*) node->GetData(); @@ -752,7 +752,7 @@ bool wxFont::GetNoAntiAliasing() return M_FONTDATA->m_noAA; } -wxNativeFontInfo *wxFont::GetNativeFontInfo() const +const wxNativeFontInfo *wxFont::GetNativeFontInfo() const { wxCHECK_MSG( Ok(), (wxNativeFontInfo *)NULL, wxT("invalid font") ); @@ -762,7 +762,7 @@ wxNativeFontInfo *wxFont::GetNativeFontInfo() const GetInternalFont(); #endif - return new wxNativeFontInfo(M_FONTDATA->m_nativeFontInfo); + return &(M_FONTDATA->m_nativeFontInfo); } bool wxFont::IsFixedWidth() const @@ -770,6 +770,7 @@ bool wxFont::IsFixedWidth() const wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") ); #if wxUSE_UNICODE + return wxFontBase::IsFixedWidth(); #else // Robert, is this right? HasNativeFont doesn't exist. if ( TRUE ) @@ -781,9 +782,10 @@ bool wxFont::IsFixedWidth() const return spacing.Upper() == _T('M'); } + // Unreaceable code for now + // return wxFontBase::IsFixedWidth(); #endif - return wxFontBase::IsFixedWidth(); } // ---------------------------------------------------------------------------- @@ -872,7 +874,7 @@ wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const int pointSize = (M_FONTDATA->m_pointSize * 10 * intScale) / 100; // search existing fonts first - wxNode* node = M_FONTDATA->m_fonts.GetFirst(); + wxList::compatibility_iterator node = M_FONTDATA->m_fonts.GetFirst(); while (node) { wxXFont* f = (wxXFont*) node->GetData();