From 490c9779845c5a51cfc48bcb39865d6c5e69be05 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Wed, 1 Jan 2003 05:19:16 +0000 Subject: [PATCH] Changes for some wxNativeFontInfo methods git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@18478 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- wxPython/src/fonts.i | 46 ++++++++++++++++++++++++++++---------------- 1 file changed, 29 insertions(+), 17 deletions(-) diff --git a/wxPython/src/fonts.i b/wxPython/src/fonts.i index 941548ddff..ea98560f4c 100644 --- a/wxPython/src/fonts.i +++ b/wxPython/src/fonts.i @@ -156,26 +156,11 @@ enum wxFontEncoding // ToString() and restore them using FromString()) struct wxNativeFontInfo { -#ifdef __WXGTK__ - // init the elements from an XLFD, return TRUE if ok - bool FromXFontName(const wxString& xFontName); - - // return false if we were never initialized with a valid XLFD - bool IsDefault() const; - - // generate an XLFD using the fontElements - wxString GetXFontName() const; - - // set the XFLD - void SetXFontName(const wxString& xFontName); -#endif - - wxNativeFontInfo() { Init(); } + wxNativeFontInfo(); // reset to the default state void Init(); -#ifndef __WXGTK__ // accessors and modifiers for the font elements int GetPointSize() const; wxFontStyle GetStyle() const; @@ -192,7 +177,6 @@ struct wxNativeFontInfo void SetFaceName(wxString facename); void SetFamily(wxFontFamily family); void SetEncoding(wxFontEncoding encoding); -#endif // it is important to be able to serialize wxNativeFontInfo objects to be // able to store them (in config file, for example) @@ -213,6 +197,34 @@ struct wxNativeFontInfo }; +%{ +// Fix some link errors... Remove this when these methods get real implementations... +#if defined(__WXGTK__) || defined(__WXX11__) +#if wxUSE_PANGO +void wxNativeFontInfo::SetPointSize(int pointsize) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetStyle(wxFontStyle style) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetWeight(wxFontWeight weight) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetUnderlined(bool WXUNUSED(underlined)) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetFaceName(wxString facename) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetFamily(wxFontFamily family) + { wxFAIL_MSG( _T("not implemented") ); } + +void wxNativeFontInfo::SetEncoding(wxFontEncoding encoding) + { wxFAIL_MSG( _T("not implemented") ); } +#endif +#endif +%} + //--------------------------------------------------------------------------- // wxFontMapper manages user-definable correspondence between logical font // names and the fonts present on the machine.