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:
@@ -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
|
||||||
|
@@ -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;
|
||||||
|
@@ -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)
|
||||||
|
@@ -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,
|
||||||
|
@@ -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) );
|
||||||
|
Reference in New Issue
Block a user