#pragma implementation "font.h"
#endif
+#ifdef __VMS
+#pragma message disable nosimpint
+#include "wx/vms_x_fix.h"
+#endif
+#include <Xm/Xm.h>
+#ifdef __VMS
+#pragma message enable nosimpint
+#endif
+
#include "wx/defs.h"
#include "wx/string.h"
#include "wx/font.h"
#include "wx/gdicmn.h"
-#include "wx/utils.h"
+#include "wx/utils.h" // for wxGetDisplay()
+#include "wx/fontutil.h" // for wxNativeFontInfo
-#include <Xm/Xm.h>
-
-#if !USE_SHARED_LIBRARIES
- IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
-#endif
+IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
// ----------------------------------------------------------------------------
// private classes
// 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();
// wxFont
// ----------------------------------------------------------------------------
+wxFont::wxFont(const wxNativeFontInfo& info)
+{
+ Init();
+
+ (void)Create(info.pointSize, info.family, info.style, info.weight,
+ info.underlined, info.faceName, info.encoding);
+}
+
void wxFont::Init()
{
if ( wxTheFontList )
}
// not found, create a new one
- XFontStruct *font = wxLoadQueryNearestFont(pointSize,
+ XFontStruct *font = (XFontStruct *)
+ wxLoadQueryNearestFont(pointSize,
M_FONTDATA->m_family,
M_FONTDATA->m_style,
M_FONTDATA->m_weight,
M_FONTDATA->m_underlined,
- T(""),
+ wxT(""),
M_FONTDATA->m_encoding);
if ( !font )
{
- wxFAIL_MSG( T("Could not allocate even a default font -- something is wrong.") );
+ wxFAIL_MSG( wxT("Could not allocate even a default font -- something is wrong.") );
return (wxXFont*) NULL;
}