X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/dd05139a8023fd3e30476409fafbe04221c6d627..f98bd6d6cf33f0475b5d737a2968b42b7ea0009f:/src/mac/carbon/gdiobj.cpp?ds=sidebyside diff --git a/src/mac/carbon/gdiobj.cpp b/src/mac/carbon/gdiobj.cpp index 163429e27f..a4bbc91059 100644 --- a/src/mac/carbon/gdiobj.cpp +++ b/src/mac/carbon/gdiobj.cpp @@ -15,29 +15,39 @@ #ifndef WX_PRECOMP #include "wx/gdicmn.h" + #include "wx/module.h" #endif +#include "wx/link.h" #include "wx/mac/private.h" -IMPLEMENT_DYNAMIC_CLASS(wxGDIObject, wxObject) +// Linker will discard entire object file without this +wxFORCE_LINK_THIS_MODULE(gdiobj) -class wxStockGDIMac: public wxStockGDI +class wxStockGDIMac: public wxStockGDI, public wxModule { public: - wxStockGDIMac(); - virtual const wxFont* GetFont(Item item); + virtual bool OnInit(); + virtual void OnExit(); + private: typedef wxStockGDI super; + DECLARE_DYNAMIC_CLASS(wxStockGDIMac) }; -static wxStockGDIMac gs_wxStockGDIMac_instance; +IMPLEMENT_DYNAMIC_CLASS(wxStockGDIMac, wxModule) -wxStockGDIMac::wxStockGDIMac() +bool wxStockGDIMac::OnInit() { // Override default instance ms_instance = this; + return true; +} + +void wxStockGDIMac::OnExit() +{ } const wxFont* wxStockGDIMac::GetFont(Item item)