]> matita.cs.unibo.it Git - helm.git/blobdiff - helm/DEVEL/mathml_editor/src/TNode.cc
Added some controls concerning the graphical deleting.
[helm.git] / helm / DEVEL / mathml_editor / src / TNode.cc
index 4235f3728f4d449e8cb8c4e9a3bce74b64f8cf1d..4523ced5d73bd7572d6f18e6fecc05a20fb4b0c3 100644 (file)
@@ -129,6 +129,22 @@ TNode::replace(const TNode& newNode) const
   parent.replaceChild(newNode.node, node);
 }
 
+void
+TNode::replace(const TNode& first, const TNode& last) const
+{
+  assert(node);
+  assert(first);
+
+  TNode p = first;
+  while (p != last)
+    {
+      TNode next = p.next();
+      insert(p);
+      p = next;
+    }
+  remove();
+}
+
 void
 TNode::insert(const TNode& newNode) const
 {