1 /////////////////////////////////////////////////////////////////////////////
3 // Purpose: wxGDIObject class
4 // Author: Stefan Csomor
8 // Copyright: (c) Stefan Csomor
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #include "wx/gdiobj.h"
13 #include "wx/gdicmn.h"
14 #include "wx/mac/private.h"
16 IMPLEMENT_DYNAMIC_CLASS(wxGDIObject
, wxObject
)
18 class wxStockGDIMac
: public wxStockGDI
23 virtual const wxFont
* GetFont(Item item
);
26 typedef wxStockGDI super
;
29 static wxStockGDIMac gs_wxStockGDIMac_instance
;
31 wxStockGDIMac::wxStockGDIMac()
33 // Override default instance
37 const wxFont
* wxStockGDIMac::GetFont(Item item
)
39 wxFont
* font
= wx_static_cast(wxFont
*, ms_stockObject
[item
]);
48 GetThemeFont(kThemeSystemFont
, GetApplicationScript(), fontName
, &fontSize
, &fontStyle
);
49 font
= new wxFont(fontSize
, wxMODERN
, wxNORMAL
, wxNORMAL
, false, wxMacMakeStringFromPascal(fontName
));
52 GetThemeFont(kThemeSmallSystemFont
, GetApplicationScript(), fontName
, &fontSize
, &fontStyle
);
53 font
= new wxFont(fontSize
, wxSWISS
, wxNORMAL
, wxNORMAL
, false, wxMacMakeStringFromPascal(fontName
));
56 font
= wx_const_cast(wxFont
*, super::GetFont(item
));
59 ms_stockObject
[item
] = font
;