]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/cocoa/font.h
Test using wxString::ToCDouble() in wxAny.
[wxWidgets.git] / include / wx / cocoa / font.h
index a8989845dbe531aa31e14074aed4408e2a589b9f..9ea87d6c2f8e75f414afce34d2ab11e8903ded52 100644 (file)
@@ -38,6 +38,20 @@ 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());
+    }
+
     /*! @abstract   Platform-independent construction with individual properties
      */
 #if FUTURE_WXWIN_COMPATIBILITY_3_0
@@ -75,19 +89,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);
-    }
-
     /*! @abstract   Construction with opaque wxNativeFontInfo
      */
     wxFont(const wxNativeFontInfo& info)