]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/osx/font.h
Don't create multiple parent-less top level frames in layout sample.
[wxWidgets.git] / include / wx / osx / font.h
index 007eaef9cfe6f7e2cccea5bb3bc5aa1e45f68993..d5e277f979c0b0e86c09bcf215a736f9a9f3c390 100644 (file)
@@ -37,6 +37,20 @@ public:
     // ctors and such
     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( wxOSXSystemFont systemFont );
 
 #if wxOSX_USE_COCOA
@@ -79,19 +93,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,