X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f76c075805027058f08ffba0e8c1b32372f5fd44..9869c26285dc51d13607cddaa04f65ce983653a5:/include/wx/gtk1/font.h diff --git a/include/wx/gtk1/font.h b/include/wx/gtk1/font.h index 0686c3934f..b240152149 100644 --- a/include/wx/gtk1/font.h +++ b/include/wx/gtk1/font.h @@ -2,7 +2,6 @@ // Name: wx/gtk1/font.h // Purpose: // Author: Robert Roebling -// Id: $Id$ // Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -32,7 +31,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 +75,7 @@ public: { Create(size, family, style, weight, underlined, face, encoding); } - + wxFont(const wxSize& pixelSize, wxFontFamily family, wxFontStyle style, @@ -75,7 +87,7 @@ public: Create(10, family, style, weight, underlined, face, encoding); SetPixelSize(pixelSize); } - + bool Create(int size, wxFontFamily family, wxFontStyle style, @@ -92,7 +104,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 +122,6 @@ public: wxDECLARE_COMMON_FONT_METHODS(); - virtual void SetNoAntiAliasing( bool no = true ); - virtual bool GetNoAntiAliasing() const ; - // implementation from now on void Unshare(); @@ -124,6 +132,7 @@ protected: virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const; virtual void DoSetNativeFontInfo( const wxNativeFontInfo& info ); + virtual wxFontFamily DoGetFamily() const; private: DECLARE_DYNAMIC_CLASS(wxFont)