X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ad81651f00edc6f489d9b6a0839d316a964fd521..8fbdfa4faf61ecc4177d9952d3f3718cf4514ae6:/src/motif/font.cpp?ds=sidebyside diff --git a/src/motif/font.cpp b/src/motif/font.cpp index e112ff2d26..a032dd8775 100644 --- a/src/motif/font.cpp +++ b/src/motif/font.cpp @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: font.cpp +// Name: src/motif/font.cpp // Purpose: wxFont class // Author: Julian Smart // Modified by: @@ -23,6 +23,7 @@ #ifdef __VMS #pragma message disable nosimpint +#include "wx/vms_x_fix.h" #endif #include #ifdef __VMS @@ -34,9 +35,9 @@ #include "wx/font.h" #include "wx/gdicmn.h" #include "wx/utils.h" // for wxGetDisplay() -#include "wx/fontutil.h" +#include "wx/fontutil.h" // for wxNativeFontInfo - IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) +IMPLEMENT_DYNAMIC_CLASS(wxFont, wxGDIObject) // ---------------------------------------------------------------------------- // private classes @@ -185,10 +186,16 @@ wxFontRefData::~wxFontRefData() // 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 ) - wxTheFontList->Append(this); } bool wxFont::Create(int pointSize, @@ -210,8 +217,6 @@ bool wxFont::Create(int pointSize, wxFont::~wxFont() { - if ( wxTheFontList ) - wxTheFontList->DeleteObject(this); } // ---------------------------------------------------------------------------- @@ -403,3 +408,4 @@ WXFontList wxFont::GetFontList(double scale, WXDisplay* display) const return (f ? f->m_fontList : (WXFontList) 0); } +