X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0b2a860f0d3ee4724e3c0c5d2ba67a982c220b4a..0364ac987d405a76385da84fa769f544bf50d40b:/src/unix/fontutil.cpp diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index 39554c0fff..8ed33684fd 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -133,6 +133,11 @@ bool wxNativeFontInfo::GetUnderlined() const return false; } +bool wxNativeFontInfo::GetStrikethrough() const +{ + return false; +} + wxString wxNativeFontInfo::GetFaceName() const { // the Pango "family" is the wx "face name" @@ -267,6 +272,11 @@ void wxNativeFontInfo::SetUnderlined(bool WXUNUSED(underlined)) wxFAIL_MSG( "not implemented" ); } +void wxNativeFontInfo::SetStrikethrough(bool WXUNUSED(strikethrough)) +{ + wxFAIL_MSG( "not implemented" ); +} + bool wxNativeFontInfo::SetFaceName(const wxString& facename) { pango_font_description_set_family(description, wxPANGO_CONV(facename)); @@ -581,8 +591,7 @@ wxString wxNativeFontInfo::GetXFontComponent(wxXLFDField field) const if ( !HasElements() ) { - // const_cast - if ( !((wxNativeFontInfo *)this)->FromXFontName(xFontName) ) + if ( !const_cast<wxNativeFontInfo *>(this)->FromXFontName(xFontName) ) return wxEmptyString; } @@ -639,8 +648,7 @@ wxString wxNativeFontInfo::GetXFontName() const elt = wxT('*'); } - // const_cast - ((wxNativeFontInfo *)this)->xFontName << wxT('-') << elt; + const_cast<wxNativeFontInfo *>(this)->xFontName << wxT('-') << elt; } } @@ -658,8 +666,7 @@ wxNativeFontInfo::SetXFontComponent(wxXLFDField field, const wxString& value) if ( !HasElements() ) { - // const_cast - if ( !((wxNativeFontInfo *)this)->FromXFontName(xFontName) ) + if ( !const_cast<wxNativeFontInfo *>(this)->FromXFontName(xFontName) ) { wxFAIL_MSG( wxT("can't set font element for invalid XLFD") ); @@ -818,6 +825,11 @@ void wxNativeFontInfo::SetUnderlined(bool WXUNUSED(underlined)) // can't do this under X } +void wxNativeFontInfo::SetStrikethrough(bool WXUNUSED(strikethrough)) +{ + // this is not supported by Pango fonts neither +} + bool wxNativeFontInfo::SetFaceName(const wxString& facename) { SetXFontComponent(wxXLFD_FAMILY, facename);