]> git.saurik.com Git - wxWidgets.git/blobdiff - src/osx/carbon/gdiobj.cpp
Respect the wxNO_BORDER flag for tool windows without a titlebar.
[wxWidgets.git] / src / osx / carbon / gdiobj.cpp
index 76156134e021d06944aa8e76b287e675ec18293e..81fb05c4580768d4133fb08d8d7e364099802935 100644 (file)
@@ -19,7 +19,8 @@
 #endif
 
 #include "wx/link.h"
-#include "wx/mac/private.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,6 +61,7 @@ const wxFont* wxStockGDIMac::GetFont(Item item)
     {
         switch (item)
         {
+#if wxOSX_USE_COCOA_OR_CARBON
         case FONT_NORMAL:
             font = new wxFont;
             font->MacCreateFromThemeFont(kThemeSystemFont);
@@ -65,6 +70,14 @@ const wxFont* wxStockGDIMac::GetFont(Item item)
             font = new wxFont;
             font->MacCreateFromThemeFont(kThemeSmallSystemFont);
             break;
+#else
+        case FONT_NORMAL:
+            font = CreateNormalFont() ; 
+            break;
+        case FONT_SMALL:
+            font = CreateSmallFont(); 
+            break;
+#endif
         default:
             font = const_cast<wxFont*>(super::GetFont(item));
             break;