X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/d2ae3af890800b7844df1673e6c9ae0e63b3dd68..d3fa4bc22e84e3ca4d88cc1772f2d414140a1017:/interface/wx/richtext/richtextxml.h?ds=sidebyside diff --git a/interface/wx/richtext/richtextxml.h b/interface/wx/richtext/richtextxml.h index 8f4b262f7d..b5a838c6ea 100644 --- a/interface/wx/richtext/richtextxml.h +++ b/interface/wx/richtext/richtextxml.h @@ -53,7 +53,7 @@ public: Recursively exports an object to the stream. */ bool ExportXML(wxOutputStream& stream, wxRichTextObject& obj, int level); - + /** Helper function: gets node context. */ @@ -86,6 +86,17 @@ public: */ bool ImportXML(wxRichTextBuffer* buffer, wxRichTextObject* obj, wxXmlNode* node); + /** + Call with XML node name, C++ class name so that wxRTC can read in the node. + If you add a custom object, call this. + */ + static void RegisterNodeName(const wxString& nodeName, const wxString& className) { sm_nodeNameToClassMap[nodeName] = className; } + + /** + Cleans up the mapping between node name and C++ class. + */ + static void ClearNodeToClassMap() { sm_nodeNameToClassMap.clear(); } + protected: /**