X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/78d14f80e9a72041ede52c30d912ec5cef21b1b3..f53b1c1e6f5546e9916debbf5f93c652edca0ef6:/contrib/src/xrc/xh_chckb.cpp diff --git a/contrib/src/xrc/xh_chckb.cpp b/contrib/src/xrc/xh_chckb.cpp index 9974211104..242a33645b 100644 --- a/contrib/src/xrc/xh_chckb.cpp +++ b/contrib/src/xrc/xh_chckb.cpp @@ -1,13 +1,13 @@ ///////////////////////////////////////////////////////////////////////////// // Name: xh_chckb.cpp -// Purpose: XML resource for wxCheckBox +// Purpose: XRC resource for wxCheckBox // Author: Bob Mitchell // Created: 2000/03/21 // RCS-ID: $Id$ // 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"));