]>
git.saurik.com Git - wxWidgets.git/blob - src/osx/carbon/gdiobj.cpp
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: src/osx/carbon/gdiobj.cpp
3 // Purpose: wxGDIObject class
4 // Author: Stefan Csomor
7 // Copyright: (c) Stefan Csomor
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #include "wx/wxprec.h"
13 #include "wx/gdiobj.h"
16 #include "wx/gdicmn.h"
17 #include "wx/module.h"
21 #include "wx/osx/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
]);
61 font
= new wxFont(wxOSX_SYSTEM_FONT_NORMAL
);
64 font
= new wxFont(wxOSX_SYSTEM_FONT_SMALL
);
67 font
= const_cast<wxFont
*>(super::GetFont(item
));
70 ms_stockObject
[item
] = font
;