X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5d6954b87d910969226ffade9714db7429211f3..f53b1c1e6f5546e9916debbf5f93c652edca0ef6:/contrib/src/xrc/xh_chckb.cpp?ds=sidebyside diff --git a/contrib/src/xrc/xh_chckb.cpp b/contrib/src/xrc/xh_chckb.cpp index 9bd2eb99ac..242a33645b 100644 --- a/contrib/src/xrc/xh_chckb.cpp +++ b/contrib/src/xrc/xh_chckb.cpp @@ -7,7 +7,7 @@ // Copyright: (c) 2000 Bob Mitchell and Verant Interactive // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// - + #ifdef __GNUG__ #pragma implementation "xh_chckb.h" #endif @@ -24,31 +24,32 @@ #if wxUSE_CHECKBOX -wxCheckBoxXmlHandler::wxCheckBoxXmlHandler() -: wxXmlResourceHandler() +IMPLEMENT_DYNAMIC_CLASS(wxCheckBoxXmlHandler, wxXmlResourceHandler) + +wxCheckBoxXmlHandler::wxCheckBoxXmlHandler() +: wxXmlResourceHandler() { AddWindowStyles(); } wxObject *wxCheckBoxXmlHandler::DoCreateResource() -{ - wxCheckBox *control = new wxCheckBox(m_parentAsWindow, - GetID(), - GetText(wxT("label")), - GetPosition(), GetSize(), - GetStyle(), - wxDefaultValidator, - GetName() - ); - - control->SetValue( GetBool( wxT("checked"))); +{ + XRC_MAKE_INSTANCE(control, wxCheckBox) + + control->Create(m_parentAsWindow, + GetID(), + GetText(wxT("label")), + GetPosition(), GetSize(), + GetStyle(), + wxDefaultValidator, + GetName()); + + control->SetValue(GetBool( wxT("checked"))); SetupWindow(control); - + return control; } - - bool wxCheckBoxXmlHandler::CanHandle(wxXmlNode *node) { return IsOfClass(node, wxT("wxCheckBox"));