]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/msw/font.h
wxMimeTypesManager now supports creating associations as well as querying
[wxWidgets.git] / include / wx / msw / font.h
index 78a836caac1ef89916964c6e5cc5cbe1e3939caa..12677e19d594b684b6996e0dec91edea71ad742e 100644 (file)
@@ -6,7 +6,7 @@
 // Created:     01/02/97
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Created:     01/02/97
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_FONT_H_
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_FONT_H_
     #pragma interface "font.h"
 #endif
 
     #pragma interface "font.h"
 #endif
 
-#include "wx/gdiobj.h"
-
-WXDLLEXPORT_DATA(extern const wxChar*) wxEmptyString;
-
 // ----------------------------------------------------------------------------
 // wxFont
 // ----------------------------------------------------------------------------
 // ----------------------------------------------------------------------------
 // wxFont
 // ----------------------------------------------------------------------------
@@ -44,6 +40,14 @@ public:
         (void)Create(size, family, style, weight, underlined, face, encoding);
     }
 
         (void)Create(size, family, style, weight, underlined, face, encoding);
     }
 
+    wxFont(const wxNativeFontInfo& info)
+    {
+        Init();
+
+        (void)Create(info.pointSize, info.family, info.style, info.weight,
+                     info.underlined, info.faceName, info.encoding);
+    }
+
     bool Create(int size,
                 int family,
                 int style,
     bool Create(int size,
                 int family,
                 int style,
@@ -82,6 +86,11 @@ public:
     virtual bool RealizeResource();
     virtual WXHANDLE GetResourceHandle();
     virtual bool FreeResource(bool force = FALSE);
     virtual bool RealizeResource();
     virtual WXHANDLE GetResourceHandle();
     virtual bool FreeResource(bool force = FALSE);
+
+    // for consistency with other wxMSW classes and to have a const
+    // GetResourceHandle()-like function we have a synonym for it
+    WXHFONT GetHFONT() const;
+
     /*
        virtual bool UseResource();
        virtual bool ReleaseResource();
     /*
        virtual bool UseResource();
        virtual bool ReleaseResource();