Fix missing documentation for several GDI functions.
[wxWidgets.git] / include / wx / cocoa / font.h
index ae5686f98d46cc8cd6dbcb98d5db8e7d8d6a07d5..9ea87d6c2f8e75f414afce34d2ab11e8903ded52 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
 /////////////////////////////////////////////////////////////////////////////
-// Name:        font.h
+// Name:        wx/cocoa/font.h
 // Purpose:     wxFont class
 // Author:      Julian Smart
 // Modified by:
 // Purpose:     wxFont class
 // Author:      Julian Smart
 // Modified by:
@@ -38,6 +38,20 @@ public:
      */
     wxFont() { }
 
      */
     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
     /*! @abstract   Platform-independent construction with individual properties
      */
 #if FUTURE_WXWIN_COMPATIBILITY_3_0
@@ -62,7 +76,7 @@ public:
     {
         (void)Create(size, family, style, weight, underlined, face, encoding);
     }
     {
         (void)Create(size, family, style, weight, underlined, face, encoding);
     }
-    
+
     wxFont(const wxSize& pixelSize,
            wxFontFamily family,
            wxFontStyle style,
     wxFont(const wxSize& pixelSize,
            wxFontFamily family,
            wxFontStyle style,
@@ -74,7 +88,7 @@ public:
         Create(10, family, style, weight, underlined, face, encoding);
         SetPixelSize(pixelSize);
     }
         Create(10, family, style, weight, underlined, face, encoding);
         SetPixelSize(pixelSize);
     }
-    
+
     /*! @abstract   Construction with opaque wxNativeFontInfo
      */
     wxFont(const wxNativeFontInfo& info)
     /*! @abstract   Construction with opaque wxNativeFontInfo
      */
     wxFont(const wxNativeFontInfo& info)
@@ -103,7 +117,6 @@ public:
 
     // implement base class pure virtuals
     virtual int GetPointSize() const;
 
     // implement base class pure virtuals
     virtual int GetPointSize() const;
-    virtual wxFontFamily GetFamily() const;
     virtual wxFontStyle GetStyle() const;
     virtual wxFontWeight GetWeight() const;
     virtual bool GetUnderlined() const;
     virtual wxFontStyle GetStyle() const;
     virtual wxFontWeight GetWeight() const;
     virtual bool GetUnderlined() const;
@@ -149,6 +162,8 @@ protected:
     virtual wxGDIRefData *CreateGDIRefData() const;
     virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
 
     virtual wxGDIRefData *CreateGDIRefData() const;
     virtual wxGDIRefData *CloneGDIRefData(const wxGDIRefData *data) const;
 
+    virtual wxFontFamily DoGetFamily() const;
+
 private:
     DECLARE_DYNAMIC_CLASS(wxFont)
 };
 private:
     DECLARE_DYNAMIC_CLASS(wxFont)
 };