]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/dfb/font.h
Don't create multiple parent-less top level frames in layout sample.
[wxWidgets.git] / include / wx / dfb / font.h
index 3ccdebb42241158dec9ca25e19f47d375e7df10d..db68dbd3ffa2224c86be9688b22b4cb33e76bd67 100644 (file)
@@ -23,6 +23,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,
@@ -60,19 +75,6 @@ public:
         SetPixelSize(pixelSize);
     }
 
-    wxFont(int pointSize,
-           wxFontFamily family,
-           int flags = wxFONTFLAG_DEFAULT,
-           const wxString& face = wxEmptyString,
-           wxFontEncoding encoding = wxFONTENCODING_DEFAULT)
-    {
-        Create(pointSize, family,
-               GetStyleFromFlags(flags),
-               GetWeightFromFlags(flags),
-               GetUnderlinedFromFlags(flags),
-               face, encoding);
-    }
-
     bool Create(int size,
                 wxFontFamily family,
                 wxFontStyle style,