]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/font.cpp
Last correction for makefile.g95: win32 mkdir does not like forward slashes as directory
[wxWidgets.git] / src / motif / font.cpp
index 10ab6faf5bd090cad51e3be9991d855ff8a3a285..c5d72cd94df249f2ae88801d1a45dc39c175d6e0 100644 (file)
     #pragma implementation "font.h"
 #endif
 
     #pragma implementation "font.h"
 #endif
 
+#ifdef __VMS
+#pragma message disable nosimpint
+#include "wx/vms_x_fix.h"
+#endif
 #include <Xm/Xm.h>
 #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"       // for wxGetDisplay()
 
 #include "wx/defs.h"
 #include "wx/string.h"
 #include "wx/font.h"
 #include "wx/gdicmn.h"
 #include "wx/utils.h"       // for wxGetDisplay()
-#include "wx/fontutil.h"
+#include "wx/fontutil.h"    // for wxNativeFontInfo
 
 
-#if !USE_SHARED_LIBRARIES
-    IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
-#endif
+IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject)
 
 // ----------------------------------------------------------------------------
 // private classes
 
 // ----------------------------------------------------------------------------
 // private classes
@@ -181,6 +186,14 @@ wxFontRefData::~wxFontRefData()
 // wxFont
 // ----------------------------------------------------------------------------
 
 // 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 )
 void wxFont::Init()
 {
     if ( wxTheFontList )
@@ -360,7 +373,8 @@ wxXFont* wxFont::GetInternalFont(double scale, WXDisplay* display) const
     }
 
     // not found, create a new one
     }
 
     // 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_family,
                                                M_FONTDATA->m_style,
                                                M_FONTDATA->m_weight,