]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/gdiobj.cpp
Forgot header with OSX prefix
[wxWidgets.git] / src / osx / carbon / gdiobj.cpp
index ad33a80ba9dd34d2bccf9467865b9423c97e9331..f768d01beafe46221e127003152f3c121247f456 100644 (file)
@@ -1,5 +1,5 @@
 /////////////////////////////////////////////////////////////////////////////
-// Name:        src/mac/carbon/gdiobj.cpp
+// Name:        src/osx/carbon/gdiobj.cpp
 // Purpose:     wxGDIObject class
 // Author:      Stefan Csomor
 // Modified by:
@@ -20,6 +20,7 @@
 
 #include "wx/link.h"
 #include "wx/osx/private.h"
+#include "wx/font.h"
 
 // Linker will discard entire object file without this
 wxFORCE_LINK_THIS_MODULE(gdiobj)
@@ -50,6 +51,9 @@ void wxStockGDIMac::OnExit()
 {
 }
 
+extern wxFont* CreateNormalFont();
+extern wxFont* CreateSmallFont();
+
 const wxFont* wxStockGDIMac::GetFont(Item item)
 {
     wxFont* font = static_cast<wxFont*>(ms_stockObject[item]);
@@ -57,14 +61,31 @@ const wxFont* wxStockGDIMac::GetFont(Item item)
     {
         switch (item)
         {
+#if wxOSX_USE_COCOA_OR_CARBON
         case FONT_NORMAL:
             font = new wxFont;
+#if wxOSX_USE_ATSU_TEXT
             font->MacCreateFromThemeFont(kThemeSystemFont);
+#else
+            font->MacCreateFromUIFont(kCTFontSystemFontType);
+#endif
             break;
         case FONT_SMALL:
             font = new wxFont;
+#if wxOSX_USE_ATSU_TEXT
             font->MacCreateFromThemeFont(kThemeSmallSystemFont);
+#else
+            font->MacCreateFromUIFont(kCTFontSmallSystemFontType);
+#endif
+            break;
+#else
+        case FONT_NORMAL:
+            font = CreateNormalFont() ; 
+            break;
+        case FONT_SMALL:
+            font = CreateSmallFont(); 
             break;
+#endif
         default:
             font = const_cast<wxFont*>(super::GetFont(item));
             break;