1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/mac/carbon/gdiobj.cpp
3 // Purpose: wxGDIObject class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/wxprec.h"
14 #include "wx/gdiobj.h"
17 #include "wx/gdicmn.h"
20 #include "wx/mac/private.h"
22 IMPLEMENT_DYNAMIC_CLASS(wxGDIObject
, wxObject
)
24 class wxStockGDIMac
: public wxStockGDI
29 virtual const wxFont
* GetFont(Item item
);
32 typedef wxStockGDI super
;
35 static wxStockGDIMac gs_wxStockGDIMac_instance
;
37 wxStockGDIMac::wxStockGDIMac()
39 // Override default instance
43 const wxFont
* wxStockGDIMac::GetFont(Item item
)
45 wxFont
* font
= static_cast<wxFont
*>(ms_stockObject
[item
]);
52 font
->MacCreateThemeFont(kThemeSystemFont
);
56 font
->MacCreateThemeFont(kThemeSmallSystemFont
);
59 font
= const_cast<wxFont
*>(super::GetFont(item
));
62 ms_stockObject
[item
] = font
;