X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0c14b6c3241d48d9cc36a2fd0aeab0ba330d96de..d642db66a5efc82d374b813022c72ba88bc50839:/include/wx/os2/font.h diff --git a/include/wx/os2/font.h b/include/wx/os2/font.h index 1efdc99f8d..e0eabda61f 100644 --- a/include/wx/os2/font.h +++ b/include/wx/os2/font.h @@ -27,6 +27,20 @@ public: // ctors and such wxFont() { } + wxFont(const wxFontInfo& info) + { + Create(info.GetPointSize(), + info.GetFamily(), + info.GetStyle(), + info.GetWeight(), + info.IsUnderlined(), + info.GetFaceName(), + info.GetEncoding()); + + if ( info.IsUsingSizeInPixels() ) + SetPixelSize(info.GetPixelSize()); + } + #if FUTURE_WXWIN_COMPATIBILITY_3_0 wxFont(int size, int family, @@ -51,6 +65,18 @@ public: Create(size, family, style, weight, underlined, face, encoding); } + wxFont(const wxSize& pixelSize, + wxFontFamily family, + wxFontStyle style, + wxFontWeight weight, + bool underlined = false, + const wxString& face = wxEmptyString, + wxFontEncoding encoding = wxFONTENCODING_DEFAULT) + { + Create(10, family, style, weight, underlined, face, encoding); + SetPixelSize(pixelSize); + } + bool Create(int size, wxFontFamily family, wxFontStyle style, @@ -81,7 +107,6 @@ public: // Implement base class pure virtuals // virtual int GetPointSize(void) const; - virtual wxFontFamily GetFamily() const; virtual wxFontStyle GetStyle() const; virtual wxFontWeight GetWeight() const; virtual bool GetUnderlined(void) const; @@ -97,7 +122,7 @@ public: virtual void SetUnderlined(bool bUnderlined); virtual void SetEncoding(wxFontEncoding vEncoding); - WXDECLARE_COMPAT_SETTERS + wxDECLARE_COMMON_FONT_METHODS(); // // For internal use only! @@ -119,6 +144,7 @@ public: protected: virtual void DoSetNativeFontInfo(const wxNativeFontInfo& rInfo); + virtual wxFontFamily DoGetFamily() const; // implement wxObject virtuals which are used by AllocExclusive() virtual wxGDIRefData *CreateGDIRefData() const;