* Includes
*/
+#include "wx/hashmap.h"
#include "wx/richtext/richtextbuffer.h"
#include "wx/richtext/richtextstyles.h"
wxString GetText(wxXmlNode *node, const wxString& param = wxEmptyString, bool translate = false);
static wxXmlNode* FindNode(wxXmlNode* node, const wxString& name);
+ /**
+ 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:
#if wxUSE_STREAMS
virtual bool DoLoadFile(wxRichTextBuffer *buffer, wxInputStream& stream);
wxMBConv* m_convMem;
wxMBConv* m_convFile;
#endif
+
+ static wxStringToStringHashMap sm_nodeNameToClassMap;
};
#endif