X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/14f355c2b5c71fc7c3d680aea366582d2ac60f7b..ed4eede6c2c16cdb422a39c1b3655956b8f51a1c:/src/motif/font.cpp diff --git a/src/motif/font.cpp b/src/motif/font.cpp index c4c0f9fcd6..b3187340d1 100644 --- a/src/motif/font.cpp +++ b/src/motif/font.cpp @@ -21,6 +21,9 @@ #pragma implementation "font.h" #endif +// For compilers that support precompilation, includes "wx.h". +#include "wx/wxprec.h" + #include "wx/defs.h" #ifdef __VMS @@ -73,7 +76,7 @@ public: int family = wxDEFAULT, int style = wxDEFAULT, int weight = wxDEFAULT, - bool underlined = FALSE, + bool underlined = false, const wxString& faceName = wxEmptyString, wxFontEncoding encoding = wxFONTENCODING_DEFAULT) { @@ -227,7 +230,7 @@ bool wxFont::Create(int pointSize, RealizeResource(); - return TRUE; + return true; } bool wxFont::Create(const wxString& fontname, wxFontEncoding enc) @@ -235,7 +238,7 @@ bool wxFont::Create(const wxString& fontname, wxFontEncoding enc) if( !fontname ) { *this = wxSystemSettings::GetFont( wxSYS_DEFAULT_GUI_FONT); - return TRUE; + return true; } m_refData = new wxFontRefData(); @@ -328,9 +331,9 @@ bool wxFont::Create(const wxString& fontname, wxFontEncoding enc) } //else: unknown encoding - may be give a warning here? else - return FALSE; + return false; } - return TRUE; + return true; } wxFont::~wxFont() @@ -473,7 +476,7 @@ int wxFont::GetWeight() const bool wxFont::GetUnderlined() const { - wxCHECK_MSG( Ok(), FALSE, wxT("invalid font") ); + wxCHECK_MSG( Ok(), false, wxT("invalid font") ); return M_FONTDATA->m_underlined; } @@ -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); } // ----------------------------------------------------------------------------