]>
git.saurik.com Git - wxWidgets.git/blob - src/osx/carbon/gdiobj.cpp
4a7a3db35278664085b0c3b0e1a623cf5e28a969
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/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/osx/private.h"
25 // Linker will discard entire object file without this
26 wxFORCE_LINK_THIS_MODULE(gdiobj
)
28 class wxStockGDIMac
: public wxStockGDI
, public wxModule
31 virtual const wxFont
* GetFont(Item item
);
33 virtual bool OnInit();
34 virtual void OnExit();
37 typedef wxStockGDI super
;
38 DECLARE_DYNAMIC_CLASS(wxStockGDIMac
)
41 IMPLEMENT_DYNAMIC_CLASS(wxStockGDIMac
, wxModule
)
43 bool wxStockGDIMac::OnInit()
45 // Override default instance
50 void wxStockGDIMac::OnExit()
54 const wxFont
* wxStockGDIMac::GetFont(Item item
)
56 wxFont
* font
= static_cast<wxFont
*>(ms_stockObject
[item
]);
62 font
= new wxFont(wxOSX_SYSTEM_FONT_NORMAL
);
65 font
= new wxFont(wxOSX_SYSTEM_FONT_SMALL
);
68 font
= const_cast<wxFont
*>(super::GetFont(item
));
71 ms_stockObject
[item
] = font
;