]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/richtext/richtextxml.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / richtext / richtextxml.h
index 44a933cb48caa789508222166f5d5f82cca9c372..964ae238a5f6db5f5c435d6b030bd11213c807c1 100644 (file)
@@ -4,7 +4,6 @@
 // Author:      Julian Smart
 // Modified by:
 // Created:     2005-09-30
-// RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
 // Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
@@ -16,6 +15,7 @@
  * Includes
  */
 
+#include "wx/hashmap.h"
 #include "wx/richtext/richtextbuffer.h"
 #include "wx/richtext/richtextstyles.h"
 
@@ -97,6 +97,17 @@ public:
     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);
@@ -108,6 +119,8 @@ protected:
     wxMBConv* m_convMem;
     wxMBConv* m_convFile;
 #endif
+
+    static wxStringToStringHashMap sm_nodeNameToClassMap;
 };
 
 #endif