diff --git a/xmind/core/const.py b/xmind/core/const.py index a9b27d1..a1b0bcb 100644 --- a/xmind/core/const.py +++ b/xmind/core/const.py @@ -55,6 +55,7 @@ ATTR_END1 = "end1" ATTR_END2 = "end2" ATTR_MARKERID = "marker-id" +ATTR_STRUCTURE ="structure-class" NS_URI = "http://www.w3.org/1999/xhtml" diff --git a/xmind/core/topic.py b/xmind/core/topic.py index 9b011cd..adef2dd 100644 --- a/xmind/core/topic.py +++ b/xmind/core/topic.py @@ -62,6 +62,12 @@ def _get_children(self): def _set_hyperlink(self, hyperlink): self.setAttribute(const.ATTR_HREF, hyperlink) #self.updateModifiedTime() + + def _set_structure(self,structure): + self.setAttribute(const.ATTR_STRUCTURE,structure) + + def setTopicStructure(self,structure): + self._set_structure(structure) def getOwnerSheet(self): parent = self.getParentNode()