X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0d0837053cd77708760d0c48a91e24ed9d6e3557..780bb8744b5a9d9492831f0bd338251aa4641c56:/src/motif/font.cpp?ds=inline diff --git a/src/motif/font.cpp b/src/motif/font.cpp index 048592aeb0..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: @@ -21,18 +21,23 @@ #pragma implementation "font.h" #endif +#ifdef __VMS +#pragma message disable nosimpint +#include "wx/vms_x_fix.h" +#endif #include +#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/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 @@ -181,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, @@ -206,8 +217,6 @@ bool wxFont::Create(int pointSize, wxFont::~wxFont() { - if ( wxTheFontList ) - wxTheFontList->DeleteObject(this); } // ---------------------------------------------------------------------------- @@ -399,3 +408,4 @@ WXFontList wxFont::GetFontList(double scale, WXDisplay* display) const return (f ? f->m_fontList : (WXFontList) 0); } +