X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f516d986371b7643efda569d64ae19e75d221411..8d1547ef4697a49cf4f4b8f09f662705e064c416:/src/mac/carbon/gdiobj.cpp diff --git a/src/mac/carbon/gdiobj.cpp b/src/mac/carbon/gdiobj.cpp index f6c046cc61..a4bbc91059 100644 --- a/src/mac/carbon/gdiobj.cpp +++ b/src/mac/carbon/gdiobj.cpp @@ -1,39 +1,53 @@ ///////////////////////////////////////////////////////////////////////////// -// Name: gdiobj.cpp +// Name: src/mac/carbon/gdiobj.cpp // Purpose: wxGDIObject class // Author: Stefan Csomor // Modified by: // Created: 1998-01-01 // RCS-ID: $Id$ // Copyright: (c) Stefan Csomor -// Licence: wxWindows licence +// Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// #include "wx/wxprec.h" #include "wx/gdiobj.h" -#include "wx/gdicmn.h" + +#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)