X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f76c075805027058f08ffba0e8c1b32372f5fd44..d642db66a5efc82d374b813022c72ba88bc50839:/include/wx/gtk1/font.h?ds=sidebyside diff --git a/include/wx/gtk1/font.h b/include/wx/gtk1/font.h index 0686c3934f..d2e6fd489c 100644 --- a/include/wx/gtk1/font.h +++ b/include/wx/gtk1/font.h @@ -32,7 +32,20 @@ public: // ctors and such wxFont() { } - // wxGTK-specific + 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()); + } + wxFont(const wxString& fontname) { Create(fontname); @@ -63,7 +76,7 @@ public: { Create(size, family, style, weight, underlined, face, encoding); } - + wxFont(const wxSize& pixelSize, wxFontFamily family, wxFontStyle style, @@ -75,7 +88,7 @@ public: Create(10, family, style, weight, underlined, face, encoding); SetPixelSize(pixelSize); } - + bool Create(int size, wxFontFamily family, wxFontStyle style, @@ -92,7 +105,6 @@ public: // implement base class pure virtuals virtual int GetPointSize() const; - virtual wxFontFamily GetFamily() const; virtual wxFontStyle GetStyle() const; virtual wxFontWeight GetWeight() const; virtual wxString GetFaceName() const; @@ -111,9 +123,6 @@ public: wxDECLARE_COMMON_FONT_METHODS(); - virtual void SetNoAntiAliasing( bool no = true ); - virtual bool GetNoAntiAliasing() const ; - // implementation from now on void Unshare(); @@ -124,6 +133,7 @@ protected: virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info ); + virtual wxFontFamily DoGetFamily() const; private: DECLARE_DYNAMIC_CLASS(wxFont)