+const wxFont* wxStockGDIMac::GetFont(Item item)
+{
+ wxFont* font = wx_static_cast(wxFont*, ms_stockObject[item]);
+ if (font == NULL)
+ {
+ Str255 fontName;
+ SInt16 fontSize;
+ Style fontStyle;
+ switch (item)
+ {
+ case FONT_NORMAL:
+ GetThemeFont(kThemeSystemFont, GetApplicationScript(), fontName, &fontSize, &fontStyle);
+ font = new wxFont(fontSize, wxMODERN, wxNORMAL, wxNORMAL, false, wxMacMakeStringFromPascal(fontName));
+ break;
+ case FONT_SMALL:
+ GetThemeFont(kThemeSmallSystemFont, GetApplicationScript(), fontName, &fontSize, &fontStyle);
+ font = new wxFont(fontSize, wxSWISS, wxNORMAL, wxNORMAL, false, wxMacMakeStringFromPascal(fontName));
+ break;
+ default:
+ font = wx_const_cast(wxFont*, super::GetFont(item));
+ break;
+ }
+ ms_stockObject[item] = font;
+ }
+ return font;
+}