]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dfb/font.h
Export recently added wxRichTextXMLHelper to fix link errors.
[wxWidgets.git] / include / wx / dfb / font.h
index 941f513deec8e17a250a56643994d4730009417e..afeee6e9932ed3513dfa88960fcd122c3c505321 100644 (file)
@@ -3,7 +3,6 @@
 // Author:      Vaclav Slavik
 // Purpose:     wxFont declaration
 // Created:     2006-08-08
-// RCS-ID:      $Id$
 // Copyright:   (c) 2006 REA Elektronik GmbH
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -23,6 +22,21 @@ class WXDLLIMPEXP_CORE wxFont : public wxFontBase
 {
 public:
     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());
+    }
+
     wxFont(const wxNativeFontInfo& info) { Create(info); }
 #if FUTURE_WXWIN_COMPATIBILITY_3_0
     wxFont(int size,
@@ -47,7 +61,7 @@ public:
     {
         Create(size, family, style, weight, underlined, face, encoding);
     }
-    
+
     wxFont(const wxSize& pixelSize,
            wxFontFamily family,
            wxFontStyle style,
@@ -59,7 +73,7 @@ public:
         Create(10, family, style, weight, underlined, face, encoding);
         SetPixelSize(pixelSize);
     }
-    
+
     bool Create(int size,
                 wxFontFamily family,
                 wxFontStyle style,
@@ -71,7 +85,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;
@@ -88,11 +101,7 @@ public:
     virtual void SetUnderlined(bool underlined);
     virtual void SetEncoding(wxFontEncoding encoding);
 
-    WXDECLARE_COMPAT_SETTERS
-
-    // Unofficial API, don't use
-    virtual void SetNoAntiAliasing(bool no = true);
-    virtual bool GetNoAntiAliasing() const;
+    wxDECLARE_COMMON_FONT_METHODS();
 
     // implementation from now on:
     wxIDirectFBFontPtr GetDirectFBFont(bool antialiased) const;
@@ -101,6 +110,8 @@ protected:
     virtual wxGDIRefData *CreateGDIRefData() const;
     virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
 
+    virtual wxFontFamily DoGetFamily() const;
+
 private:
     DECLARE_DYNAMIC_CLASS(wxFont)
 };