Added wxRichTextXMLHandler::RegisterNodeName so custom content classes can be added without
breaking XML loading git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71399 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -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:
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user