/////////////////////////////////////////////////////////////////////////////
-// Name: src/mac/carbon/gdiobj.cpp
+// Name: src/osx/carbon/gdiobj.cpp
// Purpose: wxGDIObject class
// Author: Stefan Csomor
// Modified by:
#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)
{
}
+extern wxFont* CreateNormalFont();
+extern wxFont* CreateSmallFont();
+
const wxFont* wxStockGDIMac::GetFont(Item item)
{
wxFont* font = static_cast<wxFont*>(ms_stockObject[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;