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 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
= wx_static_cast(wxFont
*, ms_stockObject
[item
]);
54 GetThemeFont(kThemeSystemFont
, GetApplicationScript(), fontName
, &fontSize
, &fontStyle
);
55 font
= new wxFont(fontSize
, wxMODERN
, wxNORMAL
, wxNORMAL
, false, wxMacMakeStringFromPascal(fontName
));
58 GetThemeFont(kThemeSmallSystemFont
, GetApplicationScript(), fontName
, &fontSize
, &fontStyle
);
59 font
= new wxFont(fontSize
, wxSWISS
, wxNORMAL
, wxNORMAL
, false, wxMacMakeStringFromPascal(fontName
));
62 font
= wx_const_cast(wxFont
*, super::GetFont(item
));
65 ms_stockObject
[item
] = font
;