]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/font.cpp
Patch [ 1100272 ] wxFlexGridSizer works wrong when some rows/cols are hidden
[wxWidgets.git] / src / motif / font.cpp
index dd3de8f55a8fff0c3d4bba6ba129c8cfb28ecd09..0c82eed410a31493c00b002cc07afe7baffeb078 100644 (file)
 // headers
 // ----------------------------------------------------------------------------
 
-#ifdef __GNUG__
+#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
     #pragma implementation "font.h"
 #endif
 
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
 #include "wx/defs.h"
 
 #ifdef __VMS
@@ -485,14 +488,14 @@ wxFontEncoding wxFont::GetEncoding() const
     return M_FONTDATA->m_encoding;
 }
 
-wxNativeFontInfo *wxFont::GetNativeFontInfo() const
+const wxNativeFontInfo *wxFont::GetNativeFontInfo() const
 {
     wxCHECK_MSG( Ok(), (wxNativeFontInfo *)NULL, wxT("invalid font") );
 
     if(M_FONTDATA->m_nativeFontInfo.GetXFontName().IsEmpty())
         GetInternalFont();
 
-    return new wxNativeFontInfo(M_FONTDATA->m_nativeFontInfo);
+    return &(M_FONTDATA->m_nativeFontInfo);
 }
 
 // ----------------------------------------------------------------------------