X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/426bb74a93e80251ecbccff454ff4715cd05f6a9..523050b607cfb5e6f9dfcb1544eb4f49ec1978cd:/contrib/include/wx/xml/xmlres.h diff --git a/contrib/include/wx/xml/xmlres.h b/contrib/include/wx/xml/xmlres.h index fd012efd0e..52c7f2a9ab 100644 --- a/contrib/include/wx/xml/xmlres.h +++ b/contrib/include/wx/xml/xmlres.h @@ -124,7 +124,7 @@ class WXDLLEXPORT wxXmlResource : public wxObject void UpdateResources(); // Finds resource (calls UpdateResources) and returns node containing it - wxXmlNode *FindResource(const wxString& name, const wxString& type); + wxXmlNode *FindResource(const wxString& name, const wxString& classname); // Creates resource from info in given node: wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance = NULL); @@ -212,11 +212,17 @@ class WXDLLEXPORT wxXmlResourceHandler : public wxObject // Variables (filled by CreateResource) wxXmlNode *m_Node; + wxString m_Class; wxObject *m_Parent, *m_Instance; wxWindow *m_ParentAsWindow, *m_InstanceAsWindow; // --- Handy methods: + // Returns true if the node has property class equal to classname, + // e.g. + bool IsOfClass(wxXmlNode *node, const wxString& classname) + { return node->GetPropVal(_T("class"), wxEmptyString) == classname; } + // Gets node content from wxXML_ENTITY_NODE // (the problem is, content is represented as // wxXML_ENTITY_NODE name="tag", content="" @@ -278,9 +284,8 @@ class WXDLLEXPORT wxXmlResourceHandler : public wxObject // Sets common window options: void SetupWindow(wxWindow *wnd); - void CreateChildren(wxObject *parent, bool only_this_handler = FALSE, - wxXmlNode *children_node = NULL /*stands for - GetParamNode("children")*/); + void CreateChildren(wxObject *parent, bool this_hnd_only = FALSE); + void CreateChildrenPrivately(wxObject *parent, wxXmlNode *rootnode = NULL); wxObject *CreateResFromNode(wxXmlNode *node, wxObject *parent, wxObject *instance = NULL) { return m_Resource->CreateResFromNode(node, parent, instance); }