X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/b5d6954b87d910969226ffade9714db7429211f3..c099c54cbaa285c452468419f2021899553ff9b3:/src/xrc/xh_stbox.cpp?ds=sidebyside diff --git a/src/xrc/xh_stbox.cpp b/src/xrc/xh_stbox.cpp index f3a27b937e..9c3c08a25f 100644 --- a/src/xrc/xh_stbox.cpp +++ b/src/xrc/xh_stbox.cpp @@ -7,10 +7,6 @@ // Copyright: (c) 2000 Brian Gavin // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// - -#ifdef __GNUG__ -#pragma implementation "xh_stbox.h" -#endif // For compilers that support precompilation, includes "wx.h". #include "wx/wxprec.h" @@ -19,34 +15,38 @@ #pragma hdrstop #endif +#if wxUSE_XRC + #include "wx/xrc/xh_stbox.h" #include "wx/statbox.h" -wxStaticBoxXmlHandler::wxStaticBoxXmlHandler() -: wxXmlResourceHandler() +IMPLEMENT_DYNAMIC_CLASS(wxStaticBoxXmlHandler, wxXmlResourceHandler) + +wxStaticBoxXmlHandler::wxStaticBoxXmlHandler() +: wxXmlResourceHandler() { AddWindowStyles(); } wxObject *wxStaticBoxXmlHandler::DoCreateResource() -{ - wxStaticBox *box = new wxStaticBox(m_parentAsWindow, - GetID(), - GetText(wxT("label")), - GetPosition(), GetSize(), - GetStyle(), - GetName() - ); +{ + XRC_MAKE_INSTANCE(box, wxStaticBox) + + box->Create(m_parentAsWindow, + GetID(), + GetText(wxT("label")), + GetPosition(), GetSize(), + GetStyle(), + GetName()); + SetupWindow(box); - + return box; } - - bool wxStaticBoxXmlHandler::CanHandle(wxXmlNode *node) { return IsOfClass(node, wxT("wxStaticBox")); } - +#endif // wxUSE_XRC