+
+
+
+
+
+
+void NodeHandlerNotebook::InsertNode(wxXmlNode *parent, wxXmlNode *node, wxXmlNode *insert_before)
+{
+ wxXmlNode *cnd = XmlFindNode(parent, "children");
+ if (cnd == NULL)
+ {
+ cnd = new wxXmlNode(wxXML_ELEMENT_NODE, "children");
+ parent->AddChild(cnd);
+ }
+
+ {
+ wxXmlNode *itemnode = new wxXmlNode(wxXML_ELEMENT_NODE, "notebookpage");
+ wxXmlNode *winnode = new wxXmlNode(wxXML_ELEMENT_NODE, "window");
+ itemnode->AddChild(winnode);
+ winnode->AddChild(node);
+
+ if (insert_before)
+ cnd->InsertChild(itemnode, insert_before);
+ else
+ cnd->AddChild(itemnode);
+ }
+ EditorFrame::Get()->NotifyChanged(CHANGED_TREE);
+}