X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/cc95f4f9477e96ac2ce9a18f410ef98a169a75a6..e4dd1e19a281da5d1e23b12fd76c9fc242bcb1d6:/include/wx/os2/font.h diff --git a/include/wx/os2/font.h b/include/wx/os2/font.h index 6cad73deff..92e0b22698 100644 --- a/include/wx/os2/font.h +++ b/include/wx/os2/font.h @@ -1,5 +1,5 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: font.h +// Name: wx/os2/font.h // Purpose: wxFont class // Author: David Webster // Modified by: @@ -14,7 +14,6 @@ #include "wx/gdiobj.h" #include "wx/os2/private.h" -#include "wx/fontutil.h" WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString; @@ -26,20 +25,17 @@ class WXDLLEXPORT wxFont : public wxFontBase { public: // ctors and such - wxFont() { Init(); } - wxFont(const wxFont& rFont) { Init(); Ref(rFont); } + wxFont() { } wxFont( int nSize ,int nFamily ,int nStyle ,int nWeight - ,bool bUnderlined = FALSE + ,bool bUnderlined = false ,const wxString& rsFace = wxEmptyString ,wxFontEncoding vEncoding = wxFONTENCODING_DEFAULT ) { - Init(); - (void)Create( nSize ,nFamily ,nStyle @@ -55,8 +51,6 @@ public: ) { - Init(); - (void)Create( rInfo ,hFont ); @@ -68,7 +62,7 @@ public: ,int nFamily ,int nStyle ,int nWeight - ,bool bUnderlined = FALSE + ,bool bUnderlined = false ,const wxString& rsFace = wxEmptyString ,wxFontEncoding vEncoding = wxFONTENCODING_DEFAULT ); @@ -78,11 +72,6 @@ public: virtual ~wxFont(); - // - // Assignment - // - wxFont& operator=(const wxFont& rFont); - // // Implement base class pure virtuals // @@ -93,20 +82,20 @@ public: virtual bool GetUnderlined(void) const; virtual wxString GetFaceName(void) const; virtual wxFontEncoding GetEncoding(void) const; - virtual wxNativeFontInfo* GetNativeFontInfo() const; + virtual const wxNativeFontInfo* GetNativeFontInfo() const; virtual void SetPointSize(int nPointSize); virtual void SetFamily(int nFamily); virtual void SetStyle(int nStyle); virtual void SetWeight(int nWeight); - virtual void SetFaceName(const wxString& rsFaceName); + virtual bool SetFaceName(const wxString& rsFaceName); virtual void SetUnderlined(bool bUnderlined); virtual void SetEncoding(wxFontEncoding vEncoding); - virtual void SetNativeFontInfo(const wxNativeFontInfo& rInfo); // // For internal use only! // + void SetPS(HPS hPS); void SetFM( PFONTMETRICS pFM ,int nNumFonts ); @@ -116,15 +105,14 @@ public: // virtual bool IsFree(void) const; virtual bool RealizeResource(void); - virtual WXHANDLE GetResourceHandle(void); - virtual bool FreeResource(bool bForce = FALSE); + virtual WXHANDLE GetResourceHandle(void) const; + virtual bool FreeResource(bool bForce = false); WXHFONT GetHFONT(void) const; + protected: - // - // Common part of all ctors - // - void Init(void); + virtual void DoSetNativeFontInfo(const wxNativeFontInfo& rInfo); + void Unshare(void); private: