From 79e4b6277eec63c346239e8957fed478f5daa6ab Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 5 Nov 1999 19:36:35 +0000 Subject: [PATCH] wXMotif compilation fixes git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/fontmap.h | 1 + include/wx/unix/fontutil.h | 1 + src/motif/font.cpp | 9 +++++---- src/unix/fontenum.cpp | 7 +++++++ src/unix/fontutil.cpp | 10 ++++++++-- 5 files changed, 22 insertions(+), 6 deletions(-) diff --git a/include/wx/fontmap.h b/include/wx/fontmap.h index 0b86555b00..e5dc01d6e0 100644 --- a/include/wx/fontmap.h +++ b/include/wx/fontmap.h @@ -24,6 +24,7 @@ #include "wx/fontutil.h" // for wxNativeEncodingInfo class WXDLLEXPORT wxConfigBase; +class WXDLLEXPORT wxWindow; // ---------------------------------------------------------------------------- // wxFontMapper manages user-definable correspondence between logical font diff --git a/include/wx/unix/fontutil.h b/include/wx/unix/fontutil.h index 6161a38e0f..ada65aa9f3 100644 --- a/include/wx/unix/fontutil.h +++ b/include/wx/unix/fontutil.h @@ -13,6 +13,7 @@ #define _WX_UNIX_FONTUTIL_H_ #ifdef __X__ + struct XFontStruct; typedef XFontStruct *wxNativeFont; #elif defined(__WXGTK__) typedef GdkFont *wxNativeFont; diff --git a/src/motif/font.cpp b/src/motif/font.cpp index 3b690765e4..10ab6faf5b 100644 --- a/src/motif/font.cpp +++ b/src/motif/font.cpp @@ -21,13 +21,14 @@ #pragma implementation "font.h" #endif +#include + #include "wx/defs.h" #include "wx/string.h" #include "wx/font.h" #include "wx/gdicmn.h" -#include "wx/utils.h" - -#include +#include "wx/utils.h" // for wxGetDisplay() +#include "wx/fontutil.h" #if !USE_SHARED_LIBRARIES IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) @@ -39,7 +40,7 @@ // For every wxFont, there must be a font for each display and scale requested. // So these objects are stored in wxFontRefData::m_fonts -class wxXFont: public wxObject +class wxXFont : public wxObject { public: wxXFont(); diff --git a/src/unix/fontenum.cpp b/src/unix/fontenum.cpp index e8a9c18f75..a1d374896e 100644 --- a/src/unix/fontenum.cpp +++ b/src/unix/fontenum.cpp @@ -26,6 +26,7 @@ #include "wx/string.h" #include "wx/utils.h" +#include "wx/fontmap.h" #include "wx/fontenum.h" #include "wx/fontutil.h" @@ -65,6 +66,12 @@ static char **CreateFontList(wxChar spacing, wxNativeEncodingInfo info; wxGetNativeFontEncoding(encoding, &info); + if ( !wxTestFontEncoding(info) ) + { + // ask font mapper for a replacement + (void)wxTheFontMapper->GetAltForEncoding(encoding, &info); + } + wxString pattern; pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"), spacing, diff --git a/src/unix/fontutil.cpp b/src/unix/fontutil.cpp index c32a5acfbb..774dd534bd 100644 --- a/src/unix/fontutil.cpp +++ b/src/unix/fontutil.cpp @@ -31,6 +31,14 @@ #ifndef WX_PRECOMP #endif // PCH +#ifdef __X__ + #include + + #include "wx/utils.h" // for wxGetDisplay() +#elif defined(__WXGTK__) + #include "gdk/gdk.h" +#endif + #include "wx/fontutil.h" #include "wx/fontmap.h" #include "wx/tokenzr.h" @@ -51,8 +59,6 @@ XFreeFont((Display *)wxGetDisplay(), font); } #elif defined(__WXGTK__) - #include "gdk/gdk.h" - static inline wxNativeFont wxLoadFont(const wxString& fontSpec) { return gdk_font_load( wxConvertWX2MB(fontSpec) ); -- 2.45.2