use wxModule to ensure proper initialization order for wxStockGDIMac
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@40735 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -17,25 +17,33 @@
|
|||||||
#include "wx/gdicmn.h"
|
#include "wx/gdicmn.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wx/module.h"
|
||||||
#include "wx/mac/private.h"
|
#include "wx/mac/private.h"
|
||||||
|
|
||||||
class wxStockGDIMac: public wxStockGDI
|
class wxStockGDIMac: public wxStockGDI, public wxModule
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
wxStockGDIMac();
|
|
||||||
|
|
||||||
virtual const wxFont* GetFont(Item item);
|
virtual const wxFont* GetFont(Item item);
|
||||||
|
|
||||||
|
virtual bool OnInit();
|
||||||
|
virtual void OnExit();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
typedef wxStockGDI super;
|
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
|
// Override default instance
|
||||||
ms_instance = this;
|
ms_instance = this;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
void wxStockGDIMac::OnExit()
|
||||||
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
const wxFont* wxStockGDIMac::GetFont(Item item)
|
const wxFont* wxStockGDIMac::GetFont(Item item)
|
||||||
|
Reference in New Issue
Block a user