1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/mac/classic/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 class wxStockGDIMac
: public wxStockGDI
27 virtual const wxFont
* GetFont(Item item
);
30 typedef wxStockGDI super
;
33 static wxStockGDIMac gs_wxStockGDIMac_instance
;
35 wxStockGDIMac::wxStockGDIMac()
37 // Override default instance
41 const wxFont
* wxStockGDIMac::GetFont(Item item
)
43 wxFont
* font
= wx_static_cast(wxFont
*, ms_stockObject
[item
]);
52 GetThemeFont(kThemeSystemFont
, GetApplicationScript(), fontName
, &fontSize
, &fontStyle
);
53 font
= new wxFont(fontSize
, wxMODERN
, wxNORMAL
, wxNORMAL
, false, wxMacMakeStringFromPascal(fontName
));
56 GetThemeFont(kThemeSmallSystemFont
, GetApplicationScript(), fontName
, &fontSize
, &fontStyle
);
57 font
= new wxFont(fontSize
, wxSWISS
, wxNORMAL
, wxNORMAL
, false, wxMacMakeStringFromPascal(fontName
));
60 font
= wx_const_cast(wxFont
*, super::GetFont(item
));
63 ms_stockObject
[item
] = font
;