wXMotif compilation fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4378 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-11-05 19:36:35 +00:00
parent 864753e906
commit 79e4b6277e
5 changed files with 22 additions and 6 deletions

View File

@@ -24,6 +24,7 @@
#include "wx/fontutil.h" // for wxNativeEncodingInfo #include "wx/fontutil.h" // for wxNativeEncodingInfo
class WXDLLEXPORT wxConfigBase; class WXDLLEXPORT wxConfigBase;
class WXDLLEXPORT wxWindow;
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxFontMapper manages user-definable correspondence between logical font // wxFontMapper manages user-definable correspondence between logical font

View File

@@ -13,6 +13,7 @@
#define _WX_UNIX_FONTUTIL_H_ #define _WX_UNIX_FONTUTIL_H_
#ifdef __X__ #ifdef __X__
struct XFontStruct;
typedef XFontStruct *wxNativeFont; typedef XFontStruct *wxNativeFont;
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
typedef GdkFont *wxNativeFont; typedef GdkFont *wxNativeFont;

View File

@@ -21,13 +21,14 @@
#pragma implementation "font.h" #pragma implementation "font.h"
#endif #endif
#include <Xm/Xm.h>
#include "wx/defs.h" #include "wx/defs.h"
#include "wx/string.h" #include "wx/string.h"
#include "wx/font.h" #include "wx/font.h"
#include "wx/gdicmn.h" #include "wx/gdicmn.h"
#include "wx/utils.h" #include "wx/utils.h" // for wxGetDisplay()
#include "wx/fontutil.h"
#include <Xm/Xm.h>
#if !USE_SHARED_LIBRARIES #if !USE_SHARED_LIBRARIES
IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
@@ -39,7 +40,7 @@
// For every wxFont, there must be a font for each display and scale requested. // For every wxFont, there must be a font for each display and scale requested.
// So these objects are stored in wxFontRefData::m_fonts // So these objects are stored in wxFontRefData::m_fonts
class wxXFont: public wxObject class wxXFont : public wxObject
{ {
public: public:
wxXFont(); wxXFont();

View File

@@ -26,6 +26,7 @@
#include "wx/string.h" #include "wx/string.h"
#include "wx/utils.h" #include "wx/utils.h"
#include "wx/fontmap.h"
#include "wx/fontenum.h" #include "wx/fontenum.h"
#include "wx/fontutil.h" #include "wx/fontutil.h"
@@ -65,6 +66,12 @@ static char **CreateFontList(wxChar spacing,
wxNativeEncodingInfo info; wxNativeEncodingInfo info;
wxGetNativeFontEncoding(encoding, &info); wxGetNativeFontEncoding(encoding, &info);
if ( !wxTestFontEncoding(info) )
{
// ask font mapper for a replacement
(void)wxTheFontMapper->GetAltForEncoding(encoding, &info);
}
wxString pattern; wxString pattern;
pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"), pattern.Printf(wxT("-*-*-*-*-*-*-*-*-*-*-%c-*-%s-%s"),
spacing, spacing,

View File

@@ -31,6 +31,14 @@
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#endif // PCH #endif // PCH
#ifdef __X__
#include <X11/Xlib.h>
#include "wx/utils.h" // for wxGetDisplay()
#elif defined(__WXGTK__)
#include "gdk/gdk.h"
#endif
#include "wx/fontutil.h" #include "wx/fontutil.h"
#include "wx/fontmap.h" #include "wx/fontmap.h"
#include "wx/tokenzr.h" #include "wx/tokenzr.h"
@@ -51,8 +59,6 @@
XFreeFont((Display *)wxGetDisplay(), font); XFreeFont((Display *)wxGetDisplay(), font);
} }
#elif defined(__WXGTK__) #elif defined(__WXGTK__)
#include "gdk/gdk.h"
static inline wxNativeFont wxLoadFont(const wxString& fontSpec) static inline wxNativeFont wxLoadFont(const wxString& fontSpec)
{ {
return gdk_font_load( wxConvertWX2MB(fontSpec) ); return gdk_font_load( wxConvertWX2MB(fontSpec) );