X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c5d3e1ccd1d27ab0cf913ddbffb1b54b5802f3a..6c0d0845c205a59cb0d8c73c0e4bcc84a9d6c550:/include/wx/msw/font.h diff --git a/include/wx/msw/font.h b/include/wx/msw/font.h index 36642fd414..06c17b10b1 100644 --- a/include/wx/msw/font.h +++ b/include/wx/msw/font.h @@ -6,7 +6,7 @@ // Created: 01/02/97 // RCS-ID: $Id$ // Copyright: (c) Julian Smart -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #ifndef _WX_FONT_H_ @@ -16,10 +16,6 @@ #pragma interface "font.h" #endif -#include "wx/gdiobj.h" - -WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; - // ---------------------------------------------------------------------------- // wxFont // ---------------------------------------------------------------------------- @@ -44,6 +40,15 @@ public: (void)Create(size, family, style, weight, underlined, face, encoding); } + wxFont(const wxNativeFontInfo& info, WXHFONT hFont = 0) + { + Init(); + + Create(info, hFont); + } + + wxFont(const wxString& fontDesc); + bool Create(int size, int family, int style, @@ -52,8 +57,13 @@ public: const wxString& face = wxEmptyString, wxFontEncoding encoding = wxFONTENCODING_DEFAULT); + bool Create(const wxNativeFontInfo& info, WXHFONT hFont = 0); + virtual ~wxFont(); + // assignment + wxFont& operator=(const wxFont& font); + // implement base class pure virtuals virtual int GetPointSize() const; virtual int GetFamily() const; @@ -62,6 +72,7 @@ public: virtual bool GetUnderlined() const; virtual wxString GetFaceName() const; virtual wxFontEncoding GetEncoding() const; + virtual wxNativeFontInfo* GetNativeFontInfo() const; virtual void SetPointSize(int pointSize); virtual void SetFamily(int family); @@ -70,15 +81,22 @@ public: virtual void SetFaceName(const wxString& faceName); virtual void SetUnderlined(bool underlined); virtual void SetEncoding(wxFontEncoding encoding); + virtual void SetNativeFontInfo(const wxNativeFontInfo& info); + + virtual bool IsFixedWidth() const; // implementation only from now on // ------------------------------- - int GetFontId() const; virtual bool IsFree() const; virtual bool RealizeResource(); virtual WXHANDLE GetResourceHandle(); virtual bool FreeResource(bool force = FALSE); + + // for consistency with other wxMSW classes and to have a const + // GetResourceHandle()-like function we have a synonym for it + WXHFONT GetHFONT() const; + /* virtual bool UseResource(); virtual bool ReleaseResource();