]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/osx/font.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / osx / font.h
index 3450dbc349fe1440fe71735d6692fa152e982a38..3bec30a8915a5b60cfb9092938abe75b95dc4e90 100644 (file)
@@ -1,10 +1,9 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        font.h
+// Name:        wx/osx/font.h
 // Purpose:     wxFont class
 // Author:      Julian Smart
 // Modified by:
 // Created:     01/02/97
-// RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -27,7 +26,7 @@ enum wxOSXSystemFont
     wxOSX_SYSTEM_FONT_MINI,
     wxOSX_SYSTEM_FONT_MINI_BOLD,
     wxOSX_SYSTEM_FONT_LABELS,
-    wxOSX_SYSTEM_FONT_VIEWS,
+    wxOSX_SYSTEM_FONT_VIEWS
 };
 
 
@@ -36,7 +35,21 @@ class WXDLLIMPEXP_CORE wxFont : public wxFontBase
 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
@@ -108,6 +121,8 @@ public:
     virtual wxFontEncoding GetEncoding() const;
     virtual const wxNativeFontInfo *GetNativeFontInfo() const;
 
+    virtual bool IsFixedWidth() const;
+
     virtual void SetPointSize(int pointSize);
     virtual void SetFamily(wxFontFamily family);
     virtual void SetStyle(wxFontStyle style);
@@ -146,11 +161,9 @@ public:
     void* MacGetATSUStyle() const ;
     void* OSXGetATSUStyle() const { return MacGetATSUStyle() ; }
 
-#if WXWIN_COMPATIBILITY_2_8
     wxDEPRECATED( wxUint32 MacGetATSUFontID() const );
     wxDEPRECATED( wxUint32 MacGetATSUAdditionalQDStyles() const );
 #endif
-#endif
 
 #if wxOSX_USE_COCOA
     WX_NSFont OSXGetNSFont() const;