X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f25881804583790351480098b50f4ce1b924e697..768f0c5a2ca98bdc8f40ff3bebc7aef560467f5a:/src/xrc/xh_tree.cpp?ds=sidebyside diff --git a/src/xrc/xh_tree.cpp b/src/xrc/xh_tree.cpp index cb0cde7e60..2947852e4a 100644 --- a/src/xrc/xh_tree.cpp +++ b/src/xrc/xh_tree.cpp @@ -26,21 +26,17 @@ wxTreeCtrlXmlHandler::wxTreeCtrlXmlHandler() : wxXmlResourceHandler() { - ADD_STYLE(wxTR_HAS_BUTTONS); - ADD_STYLE(wxTR_EDIT_LABELS); - ADD_STYLE(wxTR_MULTIPLE); + XRC_ADD_STYLE(wxTR_HAS_BUTTONS); + XRC_ADD_STYLE(wxTR_EDIT_LABELS); + XRC_ADD_STYLE(wxTR_MULTIPLE); AddWindowStyles(); } - wxObject *wxTreeCtrlXmlHandler::DoCreateResource() { - wxTreeCtrl *tree = wxStaticCast(m_instance, wxTreeCtrl); - - if (!tree) - tree = new wxTreeCtrl; + XRC_MAKE_INSTANCE(tree, wxTreeCtrl) - tree->Create( m_parentAsWindow, + tree->Create(m_parentAsWindow, GetID(), GetPosition(), GetSize(), GetStyle(), @@ -52,11 +48,7 @@ wxObject *wxTreeCtrlXmlHandler::DoCreateResource() return tree; } - - bool wxTreeCtrlXmlHandler::CanHandle(wxXmlNode *node) { return IsOfClass(node, wxT("wxTreeCtrl")); } - -