]>
git.saurik.com Git - wxWidgets.git/blob - src/mac/carbon/gdiobj.cpp
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"
18 #include "wx/module.h"
22 #include "wx/mac/private.h"
24 // Linker will discard entire object file without this
25 wxFORCE_LINK_THIS_MODULE(gdiobj
)
27 class wxStockGDIMac
: public wxStockGDI
, public wxModule
30 virtual const wxFont
* GetFont(Item item
);
32 virtual bool OnInit();
33 virtual void OnExit();
36 typedef wxStockGDI super
;
37 DECLARE_DYNAMIC_CLASS(wxStockGDIMac
)
40 IMPLEMENT_DYNAMIC_CLASS(wxStockGDIMac
, wxModule
)
42 bool wxStockGDIMac::OnInit()
44 // Override default instance
49 void wxStockGDIMac::OnExit()
53 const wxFont
* wxStockGDIMac::GetFont(Item item
)
55 wxFont
* font
= static_cast<wxFont
*>(ms_stockObject
[item
]);
62 font
->MacCreateThemeFont(kThemeSystemFont
);
66 font
->MacCreateThemeFont(kThemeSmallSystemFont
);
69 font
= const_cast<wxFont
*>(super::GetFont(item
));
72 ms_stockObject
[item
] = font
;